What should be the type hint of the following example:
import plotly.graph_objs as go
def update_scene_callback():
....
def scatter_plot(input_data, layout):
fig = go.FigureWidget(input_data)
fig.update_layout(object_layout)
scatter = fig.data[0]
scatter.on_click(update_scene_callback)
return fig
type(fig) is plotly.graph_objs._figurewidget.FigureWidget
what should be the type of input and output of scatter_plot function?
Also, assume that I have a dataframe as input variable of a function. But I don't want the dataframe to be changed inside the function. Is there any way to assign a type to an input variable, so that we can be sure the variable is not going to be changed inside the function?