docstr: The Pairwise_Consistency_plot compares the difference of 2 explainability methods across each feature and each data point,
  and plots the distribution of those differences.
  
  This plot goes one step deeper than the consistency_plot which compares methods on a global level
  by expressing differences in terms of mean across the entire dataset.
  Not only we get an understanding of how differences are distributed across the dataset,
  but we can also identify whether there are patterns based on feature values,
  and understand when a method overestimates contributions compared to the other
  
  Parameters
  ----------
  methods : list
      List of explainbility methods to compare
  selection: list
      Contains list of index, subset of the input DataFrame that we use
      for the compute of consitency statistics, by default None
  max_features: int, optional
      Maximum number of displayed features, by default 10
  max_points : int, optional
      Maximum number of displayed datapoints per feature, by default 100
  file_name: string, optional
      Specify the save path of html files. If it is not provided, no file will be saved.
  auto_open: bool
      open automatically the plot, by default False
  
  
  Returns
  -------
  figure
docstr_tok: ["The","Pairwise_Consistency_plot","compares","the","difference","of","2","explainability","methods","across","each","feature","and","each","data","point",",","and","plots","the","distribution","of","those","differences",".","This","plot","goes","one","step","deeper","than","the","consistency_plot","which","compares","methods","on","a","global","level","by","expressing","differences","in","terms","of","mean","across","the","entire","dataset",".","Not","only","we","get","an","understanding","of","how","differences","are","distributed","across","the","dataset",",","but","we","can","also","identify","whether","there","are","patterns","based","on","feature","values",",","and","understand","when","a","method","overestimates","contributions","compared","to","the","other","Parameters","--","--","--","--","--","methods",":","list","List","of","explainbility","methods","to","compare","selection",":","list","Contains","list","of","index",",","subset","of","the","input","DataFrame","that","we","use","for","the","compute","of","consitency","statistics",",","by","default","None","max_features",":","int",",","optional","Maximum","number","of","displayed","features",",","by","default","10","max_points",":","int",",","optional","Maximum","number","of","displayed","datapoints","per","feature",",","by","default","100","file_name",":","string",",","optional","Specify","the","save","path","of","html","files",".","If","it","is","not","provided",",","no","file","will","be","saved",".","auto_open",":","bool","open","automatically","the","plot",",","by","default","False","Returns","--","--","--","-","figure"]
code: def pairwise_consistency_plot(
      self,
      methods,
      selection=None,
      max_features=10,
      max_points=100,
      file_name=None,
      auto_open=False,
  ):
      """The Pairwise_Consistency_plot compares the difference of 2 explainability methods across each feature and each data point,
      and plots the distribution of those differences.
  
      This plot goes one step deeper than the consistency_plot which compares methods on a global level
      by expressing differences in terms of mean across the entire dataset.
      Not only we get an understanding of how differences are distributed across the dataset,
      but we can also identify whether there are patterns based on feature values,
      and understand when a method overestimates contributions compared to the other
  
      Parameters
      ----------
      methods : list
          List of explainbility methods to compare
      selection: list
          Contains list of index, subset of the input DataFrame that we use
          for the compute of consitency statistics, by default None
      max_features: int, optional
          Maximum number of displayed features, by default 10
      max_points : int, optional
          Maximum number of displayed datapoints per feature, by default 100
      file_name: string, optional
          Specify the save path of html files. If it is not provided, no file will be saved.
      auto_open: bool
          open automatically the plot, by default False
  
  
      Returns
      -------
      figure
      """
      if self.x is None:
          raise ValueError(
              "x must be defined in the compile to display the plot"
          )
      if not isinstance(self.x, pd.DataFrame):
          raise ValueError("x must be a pandas DataFrame")
      if len(methods) != 2:
          raise ValueError(
              "Choose 2 methods among methods of the contributions"
          )
  
      # Select contributions of input methods
      pair_indices = [self.methods.index(x) for x in methods]
      pair_weights = [self.weights[i] for i in pair_indices]
  
      # Selection
      if selection is None:
          ind_max_points = self.x.sample(
              min(max_points, len(self.x))
          ).index
          weights = [
              weight.iloc[ind_max_points] for weight in pair_weights
          ]
          x = self.x.iloc[ind_max_points]
      elif isinstance(selection, list):
          if len(selection) == 1:
              raise ValueError("Selection must include multiple points")
          else:
              weights = [
                  weight.iloc[selection] for weight in pair_weights
              ]
              x = self.x.iloc[selection]
      else:
          raise ValueError("Parameter selection must be a list")
  
      # Remove constant columns
      const_cols = x.loc[:, x.apply(pd.Series.nunique) == 1]
      x = x.drop(const_cols, axis=1)
      weights = [weight.drop(const_cols, axis=1) for weight in weights]
  
      # Only keep features based on largest mean of absolute values
      mean_contributions = np.mean(np.abs(pd.concat(weights)), axis=0)
      top_features = np.flip(
          mean_contributions.sort_values(ascending=False)[
              :max_features
          ].keys()
      )
  
      fig = self.plot_pairwise_consistency(
          weights, x, top_features, methods, file_name, auto_open
      )
  
      return fig
  
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 14 for calling the Consistency obj's underlying member method code with example usage: obj.pairwise_consistency_plot(methods, selection, max_features, max_points, file_name, auto_open) and returns: fig