code: def transform(self, x):
      try:
          return self.lbl.transform(x)  # list(x.values))
      except ValueError as ve:
          # rescue
          classes = np.unique(x)  # list(x.values))
          diff = np.setdiff1d(classes, self.lbl.classes_)
          self.lbl.classes_ = np.concatenate((self.lbl.classes_, diff))
          return self.lbl.transform(x)
  
file_path: mljar-supervised/supervised/preprocessing/label_encoder.py
imports: import copy
  import logging
  from decimal import Decimal
  import numpy
  from sklearn import preprocessing
  from supervised.utils.config import LOG_LEVEL
label_desc: Use image node_id 3 for calling the LabelEncoder obj's underlying member method code with example usage: obj.transform(x) and returns: self, self