class_docstr: A torch Dataset whose __getitem__ returns both a batch of activation vectors,
  as well as a batch of labels associated with those activation vectors.
  It is used to train a classifier in train_tcav
class_docstr_tok: ["A","torch","Dataset","whose","__getitem__","returns","both","a","batch","of","activation","vectors",",","as","well","as","a","batch","of","labels","associated","with","those","activation","vectors",".","It","is","used","to","train","a","classifier","in","train_tcav"]
docstr: Returns a batch of activation vectors, as well as a batch of labels
  indicating which concept the batch of activation vectors is associated
  with.
  
  Args:
  
      i (int): which (activation vector, label) batch in the dataset to
              return
  Returns:
      inputs (Tensor): i-th batch in Dataset (representing activation
              vectors)
      labels (Tensor): labels of i-th batch in Dataset
docstr_tok: ["Returns","a","batch","of","activation","vectors",",","as","well","as","a","batch","of","labels","indicating","which","concept","the","batch","of","activation","vectors","is","associated","with",".","Args",":","i","(","int",")",":","which","(","activation","vector",",","label",")","batch","in","the","dataset","to","return","Returns",":","inputs","(","Tensor",")",":","i-th","batch","in","Dataset","(","representing","activation","vectors",")","labels","(","Tensor",")",":","labels","of","i-th","batch","in","Dataset"]
code: def __getitem__(self, i: int):
      """
      Returns a batch of activation vectors, as well as a batch of labels
      indicating which concept the batch of activation vectors is associated
      with.
  
      Args:
  
          i (int): which (activation vector, label) batch in the dataset to
                  return
      Returns:
          inputs (Tensor): i-th batch in Dataset (representing activation
                  vectors)
          labels (Tensor): labels of i-th batch in Dataset
      """
      assert i < self.length
      k = self._i_to_k(i)
      inputs = self.datasets[k][i - self.lowers[k]]
      assert len(inputs.shape) == 2
  
      labels = torch.tensor(
          [self.labels[k]] * inputs.size(0), device=inputs.device
      )
      return inputs, labels
  
imports: from collections import defaultdict
  from typing import Any, cast, Dict, List, Set, Tuple, Union
  import numpy
  import torch
  import torch.multiprocessing
  from captum._utils.av import AV
  from captum._utils.common import _format_tensor_into_tuples, _get_module_from_name
  from captum._utils.typing import TargetType, TensorOrTupleOfTensorsGeneric
  from captum.attr import LayerActivation, LayerAttribution, LayerGradientXActivation
  from captum.concept._core.cav import CAV
  from captum.concept._core.concept import Concept, ConceptInterpreter
  from captum.concept._utils.classifier import Classifier, DefaultClassifier
  from captum.concept._utils.common import concepts_to_str
  from captum.log import log_usage
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 3 for calling the LabelledDataset obj's underlying member method code with example usage: obj.__getitem__(i) and returns: inputs,  labels