code: def process_cabin(df):
      df["Cabin"] = df["Cabin"].fillna("X")
      df["Cabin"] = df["Cabin"].apply(lambda x: str(x)[0])
      df["Cabin"] = df["Cabin"].replace(["A", "D", "E", "T"], "M")
      df["Cabin"] = df["Cabin"].replace(["B", "C"], "H")
      df["Cabin"] = df["Cabin"].replace(["F", "G"], "L")
      df["Cabin"] = df["Cabin"].map({"X": 0, "L": 1, "M": 2, "H": 3})
      df["Cabin"] = df["Cabin"].astype(int)
      return df
  
imports: from bigdl.orca import init_orca_context, stop_orca_context
  import bigdl.orca.data.pandas
label_desc: Use image node_id 2 for calling a global function with example usage: process_cabin(df) and returns: df