class_docstr: The sampling input of
  :meth:`~torch_geometric.sampler.BaseSampler.sample_from_edges`.
  
  Args:
      input_id (torch.Tensor, optional): The indices of the data loader input
          of the current mini-batch.
      row (torch.Tensor): The source node indices of seed links to start
          sampling from.
      col (torch.Tensor): The destination node indices of seed links to start
          sampling from.
      label (torch.Tensor, optional): The label for the seed links.
          (default: :obj:`None`)
      time (torch.Tensor, optional): The timestamp for the seed links.
          (default: :obj:`None`)
      input_type (Tuple[str, str, str], optional): The input edge type (in
          case of sampling in a heterogeneous graph). (default: :obj:`None`)
code: def __getitem__(
      self, index: Union[Tensor, Any]
  ) -> "EdgeSamplerInput":
      if not isinstance(index, Tensor):
          index = torch.tensor(index, dtype=torch.long)
  
      return EdgeSamplerInput(
          self.input_id[index] if self.input_id is not None else index,
          self.row[index],
          self.col[index],
          self.label[index] if self.label is not None else None,
          self.time[index] if self.time is not None else None,
          self.input_type,
      )
  
imports: import copy
  import math
  import warnings
  from abc import ABC
  from collections import defaultdict
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Dict, List, Optional, Union
  import torch
  from torch import Tensor
  from torch_geometric.data import Data, FeatureStore, GraphStore, HeteroData
  from torch_geometric.sampler.utils import to_bidirectional
  from torch_geometric.typing import EdgeType, EdgeTypeStr, NodeType, OptTensor
  from torch_geometric.utils.mixin import CastMixin
label_desc: Use image node_id 2 for calling the EdgeSamplerInput obj's underlying member method code with example usage: obj.__getitem__(index) and returns: EdgeSamplerInput