docstr: Check whether the contributions respect the correct format:
  contributions = {"method_name_1": contrib_1, "method_name_2": contrib_2, ...}
  where each contrib_i is a pandas DataFrame
  
  Parameters
  ----------
  contributions : dict
      Contributions provided by the user if no compute is required.
      Format must be {"method_name_1": contrib_1, "method_name_2": contrib_2, ...}
      where each contrib_i is a pandas DataFrame. By default None
  x : DataFrame, optional
      Dataset on which to compute consistency metrics, by default None
  preprocessing : category_encoders, ColumnTransformer, list, dict, optional (default: None)
      --> Differents types of preprocessing are available:
  
      - A single category_encoders (OrdinalEncoder/OnehotEncoder/BaseNEncoder/BinaryEncoder/TargetEncoder)
      - A single ColumnTransformer with scikit-learn encoding or category_encoders transformers
      - A list with multiple category_encoders with optional (dict, list of dict)
      - A list with a single ColumnTransformer with optional (dict, list of dict)
      - A dict
      - A list of dict
docstr_tok: ["Check","whether","the","contributions","respect","the","correct","format",":","contributions","=","{","``","method_name_1","''",":","contrib_1",",","``","method_name_2","''",":","contrib_2",",","...","}","where","each","contrib_i","is","a","pandas","DataFrame","Parameters","--","--","--","--","--","contributions",":","dict","Contributions","provided","by","the","user","if","no","compute","is","required",".","Format","must","be","{","``","method_name_1","''",":","contrib_1",",","``","method_name_2","''",":","contrib_2",",","...","}","where","each","contrib_i","is","a","pandas","DataFrame",".","By","default","None","x",":","DataFrame",",","optional","Dataset","on","which","to","compute","consistency","metrics",",","by","default","None","preprocessing",":","category_encoders",",","ColumnTransformer",",","list",",","dict",",","optional","(","default",":","None",")","--",">","Differents","types","of","preprocessing","are","available",":","-","A","single","category_encoders","(","OrdinalEncoder\/OnehotEncoder\/BaseNEncoder\/BinaryEncoder\/TargetEncoder",")","-","A","single","ColumnTransformer","with","scikit-learn","encoding","or","category_encoders","transformers","-","A","list","with","multiple","category_encoders","with","optional","(","dict",",","list","of","dict",")","-","A","list","with","a","single","ColumnTransformer","with","optional","(","dict",",","list","of","dict",")","-","A","dict","-","A","list","of","dict"]
code: def compile(self, contributions, x=None, preprocessing=None):
      """Check whether the contributions respect the correct format:
      contributions = {"method_name_1": contrib_1, "method_name_2": contrib_2, ...}
      where each contrib_i is a pandas DataFrame
  
      Parameters
      ----------
      contributions : dict
          Contributions provided by the user if no compute is required.
          Format must be {"method_name_1": contrib_1, "method_name_2": contrib_2, ...}
          where each contrib_i is a pandas DataFrame. By default None
      x : DataFrame, optional
          Dataset on which to compute consistency metrics, by default None
      preprocessing : category_encoders, ColumnTransformer, list, dict, optional (default: None)
          --> Differents types of preprocessing are available:
  
          - A single category_encoders (OrdinalEncoder/OnehotEncoder/BaseNEncoder/BinaryEncoder/TargetEncoder)
          - A single ColumnTransformer with scikit-learn encoding or category_encoders transformers
          - A list with multiple category_encoders with optional (dict, list of dict)
          - A list with a single ColumnTransformer with optional (dict, list of dict)
          - A dict
          - A list of dict
      """
      self.x = x
      self.preprocessing = preprocessing
      if not isinstance(contributions, dict):
          raise ValueError("Contributions must be a dictionary")
      self.methods = list(contributions.keys())
      self.weights = list(contributions.values())
  
      self.check_consistency_contributions(self.weights)
      self.index = self.weights[0].index
  
imports: from category_encoders import OrdinalEncoder
  import copy
  import itertools
  import matplotlib.pyplot
  import numpy
  import pandas
  from plotly import graph_objs
  from plotly.offline import plot
  from plotly.subplots import make_subplots
  from sklearn.manifold import MDS
  from shapash import SmartExplainer
  from shapash.style.style_utils import colors_loading, select_palette, define_style
label_desc: Use image node_id 3 for calling the Consistency obj's underlying member method code with example usage: obj.compile(contributions, x, preprocessing) without return types