code: def inverse_transform_contributions(
      contributions, preprocessing=None, agg_columns="sum"
  ):
      """
      Reverse contribution giving a preprocessing.
  
      Preprocessing could be :
          - a single category_encoders
          - a single ColumnTransformer
          - list with multiple category_encoders with optional (dict, list of dict)
          - list with a single ColumnTransformer with optional (dict, list of dict)
          - dict
          - list of dict
  
      Parameters
      ----------
      contributions : pandas.DataFrame
          Contributions values.
      preprocessing : category_encoders, ColumnTransformer, list, dict, optional (default: None)
          The processing apply to the original data.
      agg_columns : str (default: 'sum')
          Type of aggregation performed. For Shap we want so sum contributions of one hot encoded variables.
  
      Returns
      -------
      pandas.Dataframe
          Return the aggregate contributions.
  
      """
  
      if not isinstance(contributions, pd.DataFrame):
          raise Exception("Shap values must be a pandas dataframe.")
  
      if preprocessing is None:
          return contributions
      else:
          # Transform preprocessing into a list
          list_encoding = preprocessing_tolist(preprocessing)
  
          # check supported inverse
          use_ct, use_ce = check_transformers(list_encoding)
  
          # Apply Inverse Transform
          x_contrib_invers = contributions.copy()
          if use_ct:
              for encoding in list_encoding:
                  x_contrib_invers = calc_inv_contrib_ct(
                      x_contrib_invers, encoding, agg_columns
                  )
          else:
              for encoding in list_encoding:
                  x_contrib_invers = calc_inv_contrib_ce(
                      x_contrib_invers, encoding, agg_columns
                  )
          return x_contrib_invers
  
file_path: shapash/shapash/decomposition/contributions.py
imports: import pandas
  import numpy
  from shapash.utils.transform import preprocessing_tolist
  from shapash.utils.transform import check_transformers
  from shapash.utils.category_encoder_backend import calc_inv_contrib_ce
  from shapash.utils.columntransformer_backend import calc_inv_contrib_ct
label_desc: Use image node_id 1 for calling a global function with example usage: inverse_transform_contributions(contributions, preprocessing, agg_columns) and returns: contributions, x_contrib_invers