code: def transform_ce(x_in, encoding):
      """
      Choose and apply the transformation for the given encoding.
  
      Parameters
      ----------
      x_in : pandas.DataFrame
          Raw dataset to apply preprocessing.
      encoding : list
          A list of category encoder (OrdinalEncoder/OnehotEncoder/BaseNEncoder/BinaryEncoder/TargetEncoder)
          or a list of dict
  
      Returns
      -------
      pandas.Dataframe
          The dataset preprocessed with the given encoding.
      """
      encoder = [
          category_encoder_ordinal,
          category_encoder_onehot,
          category_encoder_basen,
          category_encoder_binary,
          category_encoder_targetencoder,
      ]
  
      if str(type(encoding)) in encoder:
          rst = encoding.transform(x_in)
  
      elif isinstance(encoding, list):
          rst = transform_ordinal(x_in, encoding)
  
      else:
          raise Exception(
              f"{encoding.__class__.__name__} not supported, no preprocessing done."
          )
  
      return rst
  
file_path: shapash/shapash/utils/category_encoder_backend.py
imports: import pandas
  import numpy
  import category_encoders
label_desc: Use image node_id 6 for calling a global function with example usage: transform_ce(x_in, encoding) and returns: rst