code: def encode(data):
      data["Sex"] = data["Sex"].map({"female": 1, "male": 0})
      data["Pclass"] = (
          data["Pclass"].map({1: 3, 2: 2, 3: 1}).astype(int)
      )
      data.loc[data["Sex"] == 0, "SexByPclass"] = data.loc[
          data["Sex"] == 0, "Pclass"
      ]
      data.loc[data["Sex"] == 1, "SexByPclass"] = (
          data.loc[data["Sex"] == 1, "Pclass"] + 3
      )
      return data
  
imports: from bigdl.orca import init_orca_context, stop_orca_context
  import bigdl.orca.data.pandas
label_desc: Use image node_id 3 for calling a global function with example usage: encode(data) and returns: data