class_docstr: An helper class that handles a list of labels.
  
  The class is to be used in the `DFtoVW` class. It parses the list of labels
  that the user could provide in the `label` argument of `DFtoVW`. The class only accepts
  a pre-defined set of label classes (defined in the class attribute `available_labels`).
  
  Args:
      label_list: The list of labels that the user passed in the attribute label of DFtoVW.
  
  Raises:
      ValueError: If the list passed has mixed types or if the labels should not be used in a list.
class_docstr_tok: ["An","helper","class","that","handles","a","list","of","labels",".","The","class","is","to","be","used","in","the","`","DFtoVW","`","class",".","It","parses","the","list","of","labels","that","the","user","could","provide","in","the","`","label","`","argument","of","`","DFtoVW","`",".","The","class","only","accepts","a","pre-defined","set","of","label","classes","(","defined","in","the","class","attribute","`","available_labels","`",")",".","Args",":","label_list",":","The","list","of","labels","that","the","user","passed","in","the","attribute","label","of","DFtoVW",".","Raises",":","ValueError",":","If","the","list","passed","has","mixed","types","or","if","the","labels","should","not","be","used","in","a","list","."]
code: def __init__(
      self, label_list: List[Union[ContextualbanditLabel, MultiLabel]]
  ):
      instance_classes = set(
          [
              type(label_instance).__name__
              for label_instance in label_list
          ]
      )
      if len(instance_classes) > 1:
          raise TypeError(
              "The list passed in 'label' has mixed label types."
          )
  
      if not all(
          isinstance(label_instance, self.available_labels)
          for label_instance in label_list
      ):
          raise TypeError(
              "The only labels that can be used with list are {accepted}.".format(
                  accepted=repr(
                      [cls.__name__ for cls in self.available_labels]
                  )[1:-1]
              )
          )
  
      # Unpack columns
      columns = set()
      # Override the type to Any as labels have complex machinery that is not yet communicated via its type.
      label_list: List[Any] = label_list
  
      for label in label_list:
          columns.update(label.columns)
      self.columns = columns
  
      self.label_list = label_list
  
      # Unpack attributes that are of type _Col
      label_cols = []
      for label_instance in label_list:
          label_cols += [
              value
              for key, value in vars(label_instance).items()
              if isinstance(value, _Col)
          ]
      self.label_cols = label_cols
  
      self.sep = self.sep_by_label[list(instance_classes)[0]]
  
      # Dynamically change class_name
      _ListLabel.__name__ = "List[{typename}]".format(
          typename=type(label_list[0]).__name__
      )
  
imports: import warnings
  import numpy
  import pandas
  from typing import Any, Hashable, List, Optional, Tuple, Type, Union
label_desc: Use image node_id 1 to create a new _ListLabel object from inherited base classes: object with example: obj = _ListLabel(label_list)