class_docstr: Class to represent labels in a dataset.
  
  It stores the labels as a numpy array and maps them to integers if necessary.
  If a mapping is not necessary, e.g. for regression tasks, the mapping will be an empty dictionary.
  
  Parameters
  ----------
  data :
      A Hugging Face Dataset object.
  
  label_name : 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.
docstr: Check if labels are available.
docstr_tok: ["Check","if","labels","are","available","."]
code: def is_available(self) -> bool:
      """Check if labels are available."""
      empty_labels = self.labels is None or len(self.labels) == 0
      empty_label_map = (
          self.label_map is None or len(self.label_map) == 0
      )
      return not (empty_labels or empty_label_map)
  
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 7 for calling the Label obj's underlying member method code with example usage: obj.is_available() and returns: unknown