code: def inv_transform_target(x_in, enc_target):
      """
      Reversed transformation for target encoded data using target encoded value.
  
      If a targeted value is linked to multiple label, we raise an exception.
  
      example of multi label :
      original mapping :
          target   value
             0.5    A
             0.5    B
             0.3    C
      new mapping :
          target value
            0.5   A / B
            0.3   C
  
      Parameters
      ----------
      x_in : pandas.DataFrame
          Prediction set.
      enc_target : list
          A list containing a TargetEncoder from category encoder.
  
      Returns
      -------
      pandas.Dataframe
          The reversed dataframe.
      """
      for tgt_enc in enc_target.ordinal_encoder.mapping:
          name_target = tgt_enc.get("col")
          mapping_ordinal = enc_target.mapping[name_target]
          mapping_target = tgt_enc.get("mapping")
          reverse_target = pd.Series(
              mapping_target.index.values, index=mapping_target
          )
          rst_target = pd.concat(
              [reverse_target, mapping_ordinal], axis=1, join="inner"
          ).fillna(value="NaN")
          aggregate = rst_target.groupby(1)[0].apply(
              lambda x: " / ".join(map(str, x))
          )
          if aggregate.shape[0] != rst_target.shape[0]:
              raise Exception(
                  "Multiple label found for the same value in TargetEncoder on col "
                  + str(name_target)
                  + "."
              )
              # print("Warning in inverse TargetEncoder - col " + str(name_target) + ": Multiple label for the same value, "
              #                                                                   "each label will be separate using : / ")
  
          transco = {
              "col": name_target,
              "mapping": pd.Series(
                  data=aggregate.index, index=aggregate.values
              ),
              "data_type": "object",
          }
          x_in = inv_transform_ordinal(x_in, [transco])
      return x_in
  
file_path: shapash/shapash/utils/category_encoder_backend.py
imports: import pandas
  import numpy
  import category_encoders
label_desc: Use image node_id 2 for calling a global function with example usage: inv_transform_target(x_in, enc_target) and returns: x_in