code: def reverse_basen(x_in, encoding):
      """
      Reversed dummies based on baseN category encoder.
  
      Parameters
      ----------
      x_in : pandas.DataFrame
          Prediction set.
      encoding : list
          A list of dict containing the col, the mapping and the data_type use for reversed transformation.
  
      Returns
      -------
      pandas.Dataframe
          The reversed dummies dataframe for a given baseN encoding encoding.
      """
      x = x_in.copy(deep=True)
      out_cols = x.columns.values.tolist()
      for ind_enc in range(len(encoding.mapping)):
          col_list = (
              encoding.mapping[ind_enc].get("mapping").columns.tolist()
          )
          insert_at = out_cols.index(col_list[0])
  
          if encoding.base == 1:
              value_array = np.array(
                  [int(col0.split("_")[-1]) for col0 in col_list]
              )
          else:
              len0 = len(col_list)
              value_array = np.array(
                  [encoding.base ** (len0 - 1 - i) for i in range(len0)]
              )
          x.insert(
              insert_at,
              encoding.cols[ind_enc],
              np.dot(x[col_list].values, value_array.T),
          )
          x.drop(col_list, axis=1, inplace=True)
          out_cols = x.columns.values.tolist()
      return x
  
file_path: shapash/shapash/utils/category_encoder_backend.py
imports: import pandas
  import numpy
  import category_encoders
label_desc: Use image node_id 4 for calling a global function with example usage: reverse_basen(x_in, encoding) and returns: x