New to Python: need help with callback for rotating a box with slider

Hi, I am new to python3 and currently struggling and trying to write a code to make interactive graph (in bokeh) to embed later in html page. I want to use the slider to rotate the box by transforming the coordinates of the box with variable “theta”. I managed to make the layout. But I can neither understand callback nor am I able to hit-and-trial into succecss.

So far, it looks like this:
boxslider

Any help in connecting slider with theta will be really appreciated. Aplogies in advance if I am not using the programming jargon.


import numpy as np
from bokeh.io import output_file
from bokeh.plotting import figure, show
from bokeh.layouts import column, row
from bokeh.models import CustomJS, Slider
from bokeh.plotting import ColumnDataSource, figure, show



#theta = np.linspace(0,360,361)
#print(theta)
theta = 0 #input the value here
theta = np.radians(-theta)

#I could have used the nested loops, but the matrix was 5x2, so i went manual way.
x = [-1*np.cos(theta)-1*np.sin(theta), 1*np.cos(theta)-1*np.sin(theta), 1*np.cos(theta)+1*np.sin(theta), 
    -1*np.cos(theta)+1*np.sin(theta), -1*np.cos(theta)-1*np.sin(theta)]
#print(x)
y = [-1*(-1)*np.sin(theta)-1*np.cos(theta), 1*(-1)*np.sin(theta)-1*np.cos(theta), 1*(-1)*np.sin(theta)+1*np.cos(theta), 
    -1*(-1)*np.sin(theta)+1*np.cos(theta), -1*(-1)*np.sin(theta)-1*np.cos(theta)]
   # print(y)

fig = figure(title = 'Box',
            plot_height = 300, plot_width = 300,
            x_range = (-3,3), y_range=(-3,3),
            toolbar_location = None)
fig.line(x, y,
            line_width = 2)

amp_slider = Slider(start=0, end=360, value=0, step=1, title="theta")

#callback code


layout = row(fig, column(amp_slider),)

show(layout)

I will really appreciate the help.
Good day.