class_docstr: A Dataset that behaves like a PyTorch :class:`torch.utils.data.Subset`.
  However, this dataset also supports the targets field.
class_docstr_tok: ["A","Dataset","that","behaves","like","a","PyTorch",":","class",":","`","torch.utils.data.Subset","`",".","However",",","this","dataset","also","supports","the","targets","field","."]
code: def __getitem__(self, idx):
      return self.dataset[self.indices[idx]]
  
imports: from abc import ABC, abstractmethod
  import bisect
  import copy
  from typing import Iterator, overload
  from typing_extensions import final
  import numpy
  from numpy import ndarray
  from torch import Tensor
  from torch.utils.data import Subset
  from .dataset_definitions import IDatasetWithTargets
  from typing import Sequence, List, Iterable, Union, Optional, TypeVar, Callable, Generic
label_desc: Use image node_id 2 for calling the SubsetWithTargets obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self