class_docstr: Encode all the categorical features into numerical ones by sequential label encoding, sequential count encoding,
  and binary encoding. Additionally, it also filters the low-frequency categories and fills the missing values.
docstr: Input a testing / validation set (pandas.DataFrame) and return the converted 2 numpy.ndarray (x,y).
  
  Args:
      df (pandas.DataFrame): Input dataframe
  
  Returns:
      numpy.ndarray, numpy.ndarray: New features and labels.
code: def transform(self, df):
      """Input a testing / validation set (pandas.DataFrame) and return the converted 2 numpy.ndarray (x,y).
  
      Args:
          df (pandas.DataFrame): Input dataframe
  
      Returns:
          numpy.ndarray, numpy.ndarray: New features and labels.
      """
      df = df.astype(dtype=self.dtype_dict)
      samples = df.shape[0]
      logging.info("Filtering and fillna features")
      for item in tqdm(self.cate_cols):
          value_counts = df[item].value_counts()
          rm_values = set(value_counts.index) - set(
              self.save_value_filter[item]
          )
          df[item] = df[item].map(
              lambda x: "<LESS>" if x in rm_values else x
          )
          df[item] = df[item].fillna("<UNK>")
  
      for item in tqdm(self.nume_cols):
          mean = (
              self.save_num_embs[item]["sum"]
              / self.save_num_embs[item]["cnt"]
          )
          df[item] = df[item].fillna(mean)
  
      logging.info("Ordinal encoding cate features")
      # ordinal_encoding
      df = self.encoder.transform(df)
  
      logging.info("Target encoding cate features")
      # dynamic_targeting_encoding
      for item in tqdm(self.cate_cols):
          avgs = self.save_cate_avgs[item]
          df[item + "_t_mean"] = df[item].map(
              lambda x: avgs[x][0] / avgs[x][1] if x in avgs else 0
          )
          df[item + "_t_count"] = df[item].map(
              lambda x: avgs[x][1] / self.samples if x in avgs else 0
          )
  
      logging.info("Start manual binary encoding")
      rows = None
      for item in tqdm(self.nume_cols + self.tgt_nume_cols):
          feats = df[item].values
          if rows is None:
              rows = feats.reshape((-1, 1))
          else:
              rows = np.concatenate(
                  [rows, feats.reshape((-1, 1))], axis=1
              )
          del feats
          gc.collect()
      for item in tqdm(self.cate_cols):
          feats = df[item].values
          bit_len = self.Max_len[item]
          res = unpackbits(feats, bit_len).reshape((samples, -1))
          rows = np.concatenate([rows, res], axis=1)
          del feats
          gc.collect()
      vld_y = np.array(df[self.label_name].values).reshape((-1, 1))
      del df
      gc.collect()
      vld_x = np.array(rows)
      return vld_x, vld_y
  
file_path: recommenders/recommenders/models/lightgbm/lightgbm_utils.py
imports: import logging
  import numpy
  import category_encoders
  from tqdm import tqdm
  import collections
  import gc
label_desc: Use image node_id 3 for calling the NumEncoder obj's underlying member method code with example usage: obj.transform(df) and returns: vld_x,  vld_y