class_docstr: Class that holds and validates datasets for Datalab.
  
  Internally, the data is stored as a datasets.Dataset object and the labels
  are integers (ranging from 0 to K-1, where K is the number of classes) stored
  in a numpy array.
  
  Parameters
  ----------
  data :
      Dataset to be audited by Datalab.
      Several formats are supported, which will internally be converted to a Dataset object.
  
      Supported formats:
          - datasets.Dataset
          - pandas.DataFrame
          - dict
              - keys are strings
              - values are arrays or lists of equal length
          - list
              - list of dictionaries with the same keys
          - str
              - path to a local file
                  - Text (.txt)
                  - CSV (.csv)
                  - JSON (.json)
              - or a dataset identifier on the Hugging Face Hub
          It checks if the string is a path to a file that exists locally, and if not,
          it assumes it is a dataset identifier on the Hugging Face Hub.
  
  label_name : Union[str, List[str]]
      Name of the label column in the dataset.
  
  map_to_int : bool
      Whether to map the labels to integers, e.g. [0, 1, ..., K-1] where K is the number of classes.
      If False, the labels are not mapped to integers, e.g. for regression tasks.
  
  Warnings
  --------
  Optional dependencies:
  
  - datasets :
      Dataset, DatasetDict and load_dataset are imported from datasets.
      This is an optional dependency of cleanlab, but is required for
      :py:class:`Datalab <cleanlab.datalab.datalab.Datalab>` to work.
code: def class_names(self) -> List[str]:
      return self.labels.class_names
  
imports: import os
  from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union, cast, TYPE_CHECKING
  import numpy
  import pandas
  from datasets.arrow_dataset import Dataset
  from datasets import ClassLabel
  from cleanlab.internal.validation import labels_to_array
label_desc: Use image node_id 6 for calling the Data obj's underlying member method code with example usage: obj.class_names() and returns: self