class_docstr: SmartPlotter is a Bridge pattern decoupling plotting functions from SmartExplainer.
  The smartplotter class includes all the methods used to display graphics
  Each SmartPlotter method is easy to use from a Smart explainer object,
  just use the following syntax
  Attributes :
  explainer: object
      SmartExplainer instance to point to.
  Example
  --------
  >>> xpl.plot.my_plot_method(param=value)
class_docstr_tok: ["SmartPlotter","is","a","Bridge","pattern","decoupling","plotting","functions","from","SmartExplainer",".","The","smartplotter","class","includes","all","the","methods","used","to","display","graphics","Each","SmartPlotter","method","is","easy","to","use","from","a","Smart","explainer","object",",","just","use","the","following","syntax","Attributes",":","explainer",":","object","SmartExplainer","instance","to","point","to",".","Example","--","--","--","--",">",">",">","xpl.plot.my_plot_method","(","param=value",")"]
docstr: Method used for sampling indices.
  Parameters
  ----------
  selection : list
      Contains list of index, subset of the input DataFrame that we want to plot
  max_points : int
      Maximum number to plot in contribution plot. if input dataset is bigger than max_points,
      a sample limits the number of points to plot.
      nb: you can also limit the number using 'selection' parameter.
  Returns
  -------
  list_ind : list
      List of indices to select
  addnote : str
      Text to inform the user the selection that has been done.
code: def _select_indices_interactions_plot(self, selection, max_points):
      """
      Method used for sampling indices.
      Parameters
      ----------
      selection : list
          Contains list of index, subset of the input DataFrame that we want to plot
      max_points : int
          Maximum number to plot in contribution plot. if input dataset is bigger than max_points,
          a sample limits the number of points to plot.
          nb: you can also limit the number using 'selection' parameter.
      Returns
      -------
      list_ind : list
          List of indices to select
      addnote : str
          Text to inform the user the selection that has been done.
      """
      # Sampling
      addnote = None
      if selection is None:
          # interaction_selection attribute is used to store already computed indices of interaction_values
          if hasattr(self, "interaction_selection"):
              list_ind = self.interaction_selection
          elif self.explainer.x_init.shape[0] <= max_points:
              list_ind = self.explainer.x_init.index.tolist()
          else:
              list_ind = random.sample(
                  self.explainer.x_init.index.tolist(), max_points
              )
              addnote = "Length of random Subset : "
      elif isinstance(selection, list):
          if len(selection) <= max_points:
              list_ind = selection
              addnote = "Length of user-defined Subset : "
          elif hasattr(self, "interaction_selection"):
              if set(selection).issubset(
                  set(self.interaction_selection)
              ):
                  list_ind = self.interaction_selection
          else:
              list_ind = random.sample(selection, max_points)
              addnote = "Length of random Subset : "
      else:
          ValueError("parameter selection must be a list")
      self.interaction_selection = list_ind
  
      return list_ind, addnote
  
imports: import warnings
  from numbers import Number
  import random
  import copy
  import math
  import numpy
  from scipy.optimize import fsolve
  import scipy.cluster.hierarchy
  import pandas
  from plotly import graph_objs
  import plotly.express
  from plotly.subplots import make_subplots
  from plotly.offline import plot
  from shapash.manipulation.select_lines import select_lines
  from shapash.manipulation.summarize import compute_features_import, project_feature_values_1d, compute_corr
  from shapash.utils.utils import add_line_break, truncate_str, compute_digit_number, add_text, maximum_difference_sort_value, compute_sorted_variables_interactions_list_indices, compute_top_correlations_features
  from shapash.webapp.utils.utils import round_to_k
  from shapash.style.style_utils import colors_loading, select_palette, define_style
label_desc: Use image node_id 22 for calling the SmartPlotter obj's underlying member method code with example usage: obj._select_indices_interactions_plot(selection, max_points) and returns: list_ind,  addnote