code: def inv_transform_ordinal(x_in, encoding):
      """
      Reversed transformation based on ordinal 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 dataframe.
      """
      for switch in encoding:
          col_name = switch.get("col")
          if not col_name in x_in.columns:
              raise Exception(f"Columns {col_name} not in dataframe.")
          column_mapping = switch.get("mapping")
          if isinstance(column_mapping, dict):
              inverse = pd.Series(
                  data=column_mapping.keys(),
                  index=column_mapping.values(),
              )
          else:
              inverse = pd.Series(
                  data=column_mapping.index, index=column_mapping.values
              )
          x_in[col_name] = (
              x_in[col_name]
              .map(inverse)
              .astype(switch.get("data_type"))
          )
      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 3 for calling a global function with example usage: inv_transform_ordinal(x_in, encoding) and returns: x_in