code: def check_postprocessing(x, postprocessing=None):
      """
      Check that postprocessing parameter has good attributes matching with x dataset or with dict of types of
      the expected data set x
  
      Parameters
      ----------
      x: pandas.DataFrame, dict
          Dataset x without preprocessing or dictionnary mapping features with the right types needed.
      postprocessing : dict
          Dictionnary of postprocessing that need to be checked.
      """
      if postprocessing:
          if not isinstance(postprocessing, dict):
              raise ValueError(
                  "Postprocessing parameter must be a dictionnary"
              )
  
          for key in postprocessing.keys():
              dict_post = postprocessing[key]
  
              if not isinstance(dict_post, dict):
                  raise ValueError(f"{key} values must be a dict")
  
              if not list(dict_post.keys()) == ["type", "rule"]:
                  raise ValueError(
                      "Wrong postprocessing keys, you need 'type' and 'rule' keys"
                  )
  
              if not dict_post["type"] in [
                  "prefix",
                  "suffix",
                  "transcoding",
                  "regex",
                  "case",
              ]:
                  raise ValueError(
                      "Wrong postprocessing method. \n"
                      "The available methods are: 'prefix', 'suffix', 'transcoding', 'regex', or 'case'"
                  )
  
              if dict_post["type"] == "case":
                  if dict_post["rule"] not in ["lower", "upper"]:
                      raise ValueError(
                          "Case modification unknown. Available ones are 'lower', 'upper'."
                      )
  
                  if isinstance(x, dict):
                      if x[key] != "object":
                          raise ValueError(
                              f"Expected string object to modify with upper/lower method in {key} dict"
                          )
                  else:
                      if not pd.api.types.is_string_dtype(x[key]):
                          raise ValueError(
                              f"Expected string object to modify with upper/lower method in {key} dict"
                          )
  
              if dict_post["type"] == "regex":
                  if not set(dict_post["rule"].keys()) == {"in", "out"}:
                      raise ValueError(
                          f"Regex modifications for {key} are not possible, the keys in 'rule' dict"
                          f" must be 'in' and 'out'."
                      )
                  if isinstance(x, dict):
                      if x[key] != "object":
                          raise ValueError(
                              f"Expected string object to modify with regex methods in {key} dict"
                          )
                  else:
                      if not pd.api.types.is_string_dtype(x[key]):
                          raise ValueError(
                              f"Expected string object to modify with upper/lower method in {key} dict"
                          )
  
imports: import copy
  import numpy
  import pandas
  from shapash.utils.category_encoder_backend import no_dummies_category_encoder, supported_category_encoder, dummies_category_encoder
  from shapash.utils.columntransformer_backend import no_dummies_sklearn, supported_sklearn
  from shapash.utils.model import extract_features_model
  from shapash.utils.model_synoptic import dict_model_feature
  from shapash.utils.transform import preprocessing_tolist, check_transformers
  from shapash.utils.columntransformer_backend import columntransformer, get_feature_names, get_list_features_names
label_desc: Use image node_id 10 for calling a global function with example usage: check_postprocessing(x, postprocessing) without return types