code: def _one_hot_encode_helper(
      df, class_name, class_range, features_generated
  ):
      for i in class_range:
          df[class_name + "_" + str(i)] = 0
          df.loc[df[class_name] == i, class_name + "_" + str(i)] = 1
          features_generated.append(class_name + "_" + str(i))
      df.drop([class_name], axis=1, inplace=True)
      features_generated.remove(class_name)
      return df
  
file_path: BigDL/python/chronos/src/bigdl/chronos/data/utils/feature.py
imports: import pandas
  import numpy
  from packaging import version
label_desc: Use image node_id 4 for calling a global function with example usage: _one_hot_encode_helper(df, class_name, class_range, features_generated) and returns: df