code: def plot_selectivity_experiment(
      results: Dict[str, List[Any]], *args, **kwargs
  ) -> None:
      """
      Plot the selectivity experiment as done in paper:
  
      References:
          1) Montavon, Grégoire, Wojciech Samek, and Klaus-Robert Müller.
          "Methods for interpreting and understanding deep neural networks."
          Digital Signal Processing 73 (2018): 1-15.
  
      Parameters
      ----------
      results: list, dict
          The results fromm the Selectivity experiment(s).
      args: optional
          Arguments.
      kwargs: optional
          Keyword arguments.
  
      Returns
      -------
      None
      """
  
      fig = plt.figure(figsize=(8, 6))
      if isinstance(results, dict):
          alllengths = [
              len(score)
              for scores in results.values()
              for score in scores
          ]
          minlength = np.min(alllengths)
          if np.any(np.array(alllengths) > minlength):
              warn.warn_different_array_lengths()
          for method, scores in results.items():
              plt.plot(
                  np.arange(0, len(scores[0][:minlength])),
                  np.mean(
                      np.array([score[:minlength] for score in scores]),
                      axis=0,
                  ),
                  label=f"{str(method.capitalize())}",
              )
      elif isinstance(results, list):
          plt.plot(np.arange(0, len(results)), np.mean(results, axis=0))
      plt.xlabel(f"# Patches removed")
      plt.ylabel(f"Average function value $f(x)$")
      plt.gca().set_yticklabels(
          ["{:.0f}%".format(x * 100) for x in plt.gca().get_yticks()]
      )
      plt.legend()
      plt.show()
  
file_path: Quantus/quantus/helpers/plotting.py
imports: from typing import List, Union, Dict, Any
  import matplotlib.pyplot
  import numpy
  from quantus.helpers import warn
label_desc: Use image node_id 2 for calling a global function with example usage: plot_selectivity_experiment(results) without return types