code: def plot_pixel_flipping_experiment(
      y_batch: np.ndarray,
      scores: List[Any],
      single_class: Union[int, None] = None,
      *args,
      **kwargs,
  ) -> None:
      """
      Plot the pixel-flipping experiment as done in paper:
  
      References:
          1) Bach, Sebastian, et al. "On pixel-wise explanations for non-linear classifier
          decisions by layer-wise relevance propagation." PloS one 10.7 (2015): e0130140.
  
      Parameters
      ----------
      y_batch: np.ndarray
           The list of true labels.
      scores: list
          The list of evalution scores.
      single_class: integer, optional
          An integer to specify the label to plot.
      args: optional
          Arguments.
      kwargs: optional
          Keyword arguments.
  
      Returns
      -------
      None
      """
  
      fig = plt.figure(figsize=(8, 6))
      if single_class is None:
          for c in np.unique(y_batch):
              indices = np.where(y_batch == c)
              plt.plot(
                  np.linspace(0, 1, len(scores[0])),
                  np.mean(np.array(scores)[indices], axis=0),
                  label=f"target: {str(c)} ({indices[0].size} samples)",
              )
      plt.xlabel("Fraction of pixels flipped")
      plt.ylabel("Mean Prediction")
      plt.gca().set_yticklabels(
          ["{:.0f}%".format(x * 100) for x in plt.gca().get_yticks()]
      )
      plt.gca().set_xticklabels(
          ["{:.0f}%".format(x * 100) for x in plt.gca().get_xticks()]
      )
      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 1 for calling a global function with example usage: plot_pixel_flipping_experiment(y_batch, scores, single_class) without return types