Run two independent plots on bokeh server from one python script

Can I draw multiple plots independently (not as grid plots) written as separate functions in a single python script file (not as separate file for each plot), and based on the user runtime inputs, particular function should be called to plot graphs with bokeh server?

I have my web based dashboard where user may choose multiple interactive plots. So based on plots he selected, I have to run particular python script file. But I am thinking of writing each plot as a function in a single python script, can this be done? How to do that?