class_docstr: Decorator pattern. It simply iterates the method of its member as many times as needed.
  It thus extends any class to apply its methods to a list of arguments.
class_docstr_tok: ["Decorator","pattern",".","It","simply","iterates","the","method","of","its","member","as","many","times","as","needed",".","It","thus","extends","any","class","to","apply","its","methods","to","a","list","of","arguments","."]
docstr: Check if the first argument is a list. Raise exception otherwise.
  
  Parameters
  ----------
  arg : object
      Any argument, should be a list.
  name : string
      Name of function targeted.
  
  Raises
  ------
  ValueError
      Raise if first argument is not a list.
docstr_tok: ["Check","if","the","first","argument","is","a","list",".","Raise","exception","otherwise",".","Parameters","--","--","--","--","--","arg",":","object","Any","argument",",","should","be","a","list",".","name",":","string","Name","of","function","targeted",".","Raises","--","--","--","ValueError","Raise","if","first","argument","is","not","a","list","."]
code: def check_first_arg(self, arg, name):
      """
      Check if the first argument is a list. Raise exception otherwise.
  
      Parameters
      ----------
      arg : object
          Any argument, should be a list.
      name : string
          Name of function targeted.
  
      Raises
      ------
      ValueError
          Raise if first argument is not a list.
      """
      if not isinstance(arg, list):
          raise ValueError(
              "{} is not applied to a list of contributions,"
              "please check that you are dealing with a multi-class problem.".format(
                  name
              )
          )
  
file_path: shapash/shapash/explainer/multi_decorator.py
imports: from shapash.explainer.smart_state import SmartState
label_desc: Use image node_id 6 for calling the MultiDecorator obj's underlying member method code with example usage: obj.check_first_arg(arg, name) without return types