docstr: Given the contributions of all instances for two selected instances, calculate the distance between them
  
  Parameters
  ----------
  methods : list
      List of methods used in the calculation of contributions
  mean_distances : DataFrame
      DataFrame storing all pairwise distances between methods
  index_i : int
      Index of method 1
  index_j : int
      Index of method 2
  l2_dist : array
      Distance between the two selected methods for all instances
docstr_tok: ["Given","the","contributions","of","all","instances","for","two","selected","instances",",","calculate","the","distance","between","them","Parameters","--","--","--","--","--","methods",":","list","List","of","methods","used","in","the","calculation","of","contributions","mean_distances",":","DataFrame","DataFrame","storing","all","pairwise","distances","between","methods","index_i",":","int","Index","of","method","1","index_j",":","int","Index","of","method","2","l2_dist",":","array","Distance","between","the","two","selected","methods","for","all","instances"]
code: def calculate_mean_distances(
      self, methods, mean_distances, index_i, index_j, l2_dist
  ):
      """
      Given the contributions of all instances for two selected instances, calculate the distance between them
  
      Parameters
      ----------
      methods : list
          List of methods used in the calculation of contributions
      mean_distances : DataFrame
          DataFrame storing all pairwise distances between methods
      index_i : int
          Index of method 1
      index_j : int
          Index of method 2
      l2_dist : array
          Distance between the two selected methods for all instances
      """
      # Calculate mean distance between the two methods and update the matrix
      mean_distances.loc[methods[index_i], methods[index_j]] = np.mean(
          l2_dist
      )
      mean_distances.loc[methods[index_j], methods[index_i]] = np.mean(
          l2_dist
      )
  
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 8 for calling the Consistency obj's underlying member method code with example usage: obj.calculate_mean_distances(methods, mean_distances, index_i, index_j, l2_dist) without return types