code: def encode_age(df):
      df.Age = df.Age.fillna(-0.5)
      bins = (-1, 0, 5, 12, 18, 25, 35, 60, 120)
      categories = pd.cut(df.Age, bins, labels=False)
      df.Age = categories
      return df
  
file_path: gradio/demo/titanic_survival/run.py
imports: import os
  import pandas
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.model_selection import train_test_split
  import gradio
label_desc: Use image node_id 1 for calling a global function with example usage: encode_age(df) and returns: df