code: def handle_predefined(data_id, df=None):
      import dtale.predefined_filters as predefined_filters
  
      df = global_state.get_data(data_id) if df is None else df
      filters = predefined_filters.get_filters()
      if not filters:
          return df
  
      curr_settings = global_state.get_settings(data_id) or {}
      filter_values = curr_settings.get("predefinedFilters")
      if not filter_values:
          return df
  
      for f in filters:
          if f.name in filter_values:
              filter_value = filter_values[f.name]
              if (
                  filter_value.get("active", True)
                  and filter_value.get("value") is not None
              ):
                  df = f.handler(df, filter_value["value"])
      return df
  
file_path: dtale/dtale/query.py
imports: import pandas
  import dtale.global_state
  from dtale.pandas_util import check_pandas_version
  from dtale.utils import format_data, get_bool_arg
label_desc: Use image node_id 8 for calling a global function with example usage: handle_predefined(data_id, df) and returns: df, df, df