code: def encode_nominal(
      label_encoders,
      data,
  ):
      for col in label_encoders.keys():
          label_map = {
              val: label
              for label, val in enumerate(label_encoders[col].classes_)
          }
          data[col] = data[col].map(label_map)
          # fillna and convert to int
          data[col] = (
              data[col].fillna(DEFAULT_ENCODING_VALUE).astype(np.int64)
          )
  
file_path: AIX360/aix360/algorithms/rule_induction/ripper/base.py
imports: import sys
  import numpy
  from pandas import DataFrame
  from sklearn.model_selection import train_test_split
  from sklearn.preprocessing import LabelEncoder
  from aix360.algorithms.rule_induction.ripper.binding import EQ, LE, GE
label_desc: Use image node_id 3 for calling a global function with example usage: encode_nominal(label_encoders, data) without return types