code: def select_movies():
      genre_val = genre.value
      director_val = director.value.strip()
      cast_val = cast.value.strip()
      selected = movies[
          (movies.Reviews >= reviews.value)
          & (movies.BoxOffice >= (boxoffice.value * 1e6))
          & (movies.Year >= min_year.value)
          & (movies.Year <= max_year.value)
          & (movies.Oscars >= oscars.value)
      ]
      if genre_val != "All":
          selected = selected[selected.Genre.str.contains(genre_val)]
      if director_val != "":
          selected = selected[
              selected.Director.str.contains(director_val)
          ]
      if cast_val != "":
          selected = selected[selected.Cast.str.contains(cast_val)]
      return selected
  
file_path: bokeh/examples/server/app/movies/main.py
imports: import sqlite3
  from os.path import dirname, join
  from pathlib import Path
  import numpy
  import pandas.io.sql
  from bokeh.io import curdoc
  from bokeh.layouts import column, row
  from bokeh.models import ColumnDataSource, Div, Select, Slider, TextInput
  from bokeh.plotting import figure
  from bokeh.sampledata.movies_data import movie_path
label_desc: Use image node_id 1 for calling a global function with example usage: select_movies() and returns: selected