code: def generate_HasBsmt(df):
      df["HasBsmt"] = 0
      df.loc[df["TotalBsmtSF"] > 0, "HasBsmt"] = 1
      return df
  
imports: import bigdl.orca.data.pandas
  from bigdl.orca.data.transformer import *
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: generate_HasBsmt(df) and returns: df