code: def transform_label(tbl):
      gen_label = lambda x: 1 if max(x) > 0 else 0
      tbl = tbl.apply(
          in_col=timestamp_cols,
          out_col="label",
          func=gen_label,
          dtype="int",
      )
      return tbl
  
file_path: BigDL/python/friesian/example/wnd/recsys2021/wnd_preprocess_recsys.py
imports: import os
  from argparse import ArgumentParser
  import tempfile
  import pickle
  from time import time
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.data.file import makedirs, exists
  from bigdl.dllib.utils.file_utils import put_local_file_to_remote
  from bigdl.friesian.feature import FeatureTable
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 5 for calling a global function with example usage: transform_label(tbl) and returns: tbl