code: def check_contribution_object(case, classes, contributions):
      """
      Check len of list if _case is "classification"
      Check contributions object type if _case is "regression"
      Check type of contributions and transform into (list of) pd.Dataframe if necessary
  
      Parameters
      ----------
      case: string
          String that informs if the model used is for classification or regression problem.
      classes: list, None
          List of labels if the model used is for classification problem, None otherwise.
      contributions : pandas.DataFrame, np.ndarray or list
      """
      if (
          case == "regression"
          and isinstance(contributions, (np.ndarray, pd.DataFrame))
          == False
      ):
          raise ValueError(
              """
              Type of contributions parameter specified is not compatible with 
              regression model.
              Please check model and contributions parameters.  
              """
          )
      elif case == "classification":
          if isinstance(contributions, list):
              if len(contributions) != len(classes):
                  raise ValueError(
                      """
                      Length of list of contributions parameter is not equal
                      to the number of classes in the target.
                      Please check model and contributions parameters.
                      """
                  )
          else:
              raise ValueError(
                  """
                  Type of contributions parameter specified is not compatible with 
                  classification model.
                  Please check model and contributions parameters.
                  """
              )
  
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 6 for calling a global function with example usage: check_contribution_object(case, classes, contributions) without return types