class_docstr: A dataset that allows for active learning.
  
  Args:
      dataset: The baseline dataset.
      labelled: An array that acts as a mask which is greater than 1 for every
          data point that is labelled, and 0 for every data point that is not
          labelled.
      make_unlabelled: The function that returns an
          unlabelled version of a datum so that it can still be used in the DataLoader.
      random_state: Set the random seed for label_randomly().
      pool_specifics: Attributes to set when creating the pool.
                                       Useful to remove data augmentation.
      last_active_steps: If specified, will iterate over the last active steps
                          instead of the full dataset. Useful when doing partial finetuning.
docstr: Label data points.
  The index should be relative to the pool, not the overall data.
  
  Args:
      index: one or many indices to label.
      value: The label value. If not provided, no modification
                              to the underlying dataset is done.
  
  Raises:
      ValueError if the indices do not match the values or
       if no `value` is provided and `can_label` is True.
docstr_tok: ["Label","data","points",".","The","index","should","be","relative","to","the","pool",",","not","the","overall","data",".","Args",":","index",":","one","or","many","indices","to","label",".","value",":","The","label","value",".","If","not","provided",",","no","modification","to","the","underlying","dataset","is","done",".","Raises",":","ValueError","if","the","indices","do","not","match","the","values","or","if","no","`","value","`","is","provided","and","`","can_label","`","is","True","."]
code: def label(
      self, index: Union[list, int], value: Optional[Any] = None
  ) -> None:
      """
      Label data points.
      The index should be relative to the pool, not the overall data.
  
      Args:
          index: one or many indices to label.
          value: The label value. If not provided, no modification
                                  to the underlying dataset is done.
  
      Raises:
          ValueError if the indices do not match the values or
           if no `value` is provided and `can_label` is True.
      """
      if isinstance(index, int):
          # We were provided only the index, we make a list.
          index_lst = [index]
          value_lst: List[Any] = [value]
      else:
          index_lst = index
          if value is None:
              value_lst = [value]
          else:
              value_lst = value
  
      if value_lst[0] is not None and len(index_lst) != len(value_lst):
          raise ValueError(
              "Expected `index` and `value` to be of same length when `value` is provided."
              f"Got index={len(index_lst)} and value={len(value_lst)}"
          )
      indexes = self._pool_to_oracle_index(index_lst)
      active_step = self.current_al_step + 1
      for idx, val in zip_longest(indexes, value_lst, fillvalue=None):
          if self.can_label and val is not None:
              self._dataset.label(idx, val)  # type: ignore
              self.labelled_map[idx] = active_step
          elif self.can_label and val is None:
              raise ValueError(
                  """The dataset is able to label data, but no label was provided.
                                   If this is a research setting, please set the
                                    `ActiveLearningDataset.can_label` to `False`.
                                    """
              )
          else:
              # Regular research usecase.
              self.labelled_map[idx] = active_step
              if val is not None:
                  warnings.warn(
                      "We will consider the original label of this datasample : {}, {}.".format(
                          self._dataset[idx][0], self._dataset[idx][1]
                      ),
                      UserWarning,
                  )
  
imports: import warnings
  from copy import deepcopy
  from itertools import zip_longest
  from typing import Union, Optional, Callable, Any, Dict, List, Sequence, Mapping
  import numpy
  import torch
  import torch.utils.data
  from torch import Tensor
  from baal.active.dataset.base import SplittedDataset, Dataset
  from baal.utils.equality import deep_check
label_desc: Use image node_id 6 for calling the ActiveLearningDataset obj's underlying member method code with example usage: obj.label(index, value) without return types