class_docstr: This class provides functionality to store and load activation vectors
  generated for pre-defined neural network layers.
  It also provides functionality to check if activation vectors already
  exist in the manifold and other auxiliary functions.
  
  This class also defines a torch `Dataset`, representing Activation Vectors,
  which enables lazy access to activation vectors and layer stored in the manifold.
class_docstr_tok: ["This","class","provides","functionality","to","store","and","load","activation","vectors","generated","for","pre-defined","neural","network","layers",".","It","also","provides","functionality","to","check","if","activation","vectors","already","exist","in","the","manifold","and","other","auxiliary","functions",".","This","class","also","defines","a","torch","`","Dataset","`",",","representing","Activation","Vectors",",","which","enables","lazy","access","to","activation","vectors","and","layer","stored","in","the","manifold","."]
docstr: Helper to extract input from labels when getting items from a Dataset. Assumes
  that data is either a single value, or a tuple containing two elements.
  The input could itself be a Tuple containing multiple values. If your
  dataset returns a Tuple with more than 2 elements, please reformat it such that
  all inputs are formatted into a tuple stored at the first position.
docstr_tok: ["Helper","to","extract","input","from","labels","when","getting","items","from","a","Dataset",".","Assumes","that","data","is","either","a","single","value",",","or","a","tuple","containing","two","elements",".","The","input","could","itself","be","a","Tuple","containing","multiple","values",".","If","your","dataset","returns","a","Tuple","with","more","than","2","elements",",","please","reformat","it","such","that","all","inputs","are","formatted","into","a","tuple","stored","at","the","first","position","."]
code: def _unpack_data(data: Union[Any, Tuple[Any, Any]]) -> Any:
      r"""
      Helper to extract input from labels when getting items from a Dataset. Assumes
      that data is either a single value, or a tuple containing two elements.
      The input could itself be a Tuple containing multiple values. If your
      dataset returns a Tuple with more than 2 elements, please reformat it such that
      all inputs are formatted into a tuple stored at the first position.
      """
      if isinstance(data, tuple) or isinstance(data, list):
          data = data[0]
      return data
  
imports: import glob
  import os
  import re
  import warnings
  from typing import Any, List, Optional, Tuple, Union
  import captum._utils.common
  import torch
  from captum.attr import LayerActivation
  from torch import Tensor
  from torch.nn import Module
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 10 for calling the AV obj's underlying member method code with example usage: obj._unpack_data(data) and returns: data