class_docstr: The neighbor sampler from the `"Inductive Representation Learning on
  Large Graphs" <https://arxiv.org/abs/1706.02216>`_ literature, which allows
  for mini-batch training of GNNs on large-scale graphs where full-batch
  training is not feasible.
  
  Arguments
  ------------
  edge_index:
      A :obj:`torch.LongTensor` that defines the underlying graph
      connectivity/message passing flow.
      :obj:`edge_index` holds the indices of a (sparse) adjacency matrix.
      If :obj:`edge_index` is of type :obj:`torch.LongTensor`, its shape
      must be defined as :obj:`[2, num_edges]`, where messages from nodes
      :obj:`edge_index[0]` are sent to nodes in :obj:`edge_index[1]`
      (in case :obj:`flow="source_to_target"`).
  target_nodes_indexes:
      indexes of target nodes to learn representation.
  sampling_sizes:
      The number of neighbors to sample for each node in each layer.
      If set to :obj:`sampling_sizes[l] = -1`, all neighbors are included in layer :obj:`l`.
  batch_size:
      number of target nodes for each mini-batch.
  num_workers:
      num_workers argument for inner :class:`torch.utils.data.DataLoader`
  shuffle:
      whether to shuffle target nodes for mini-batches.
code: def __iter__(self):
      if self.__cached_sampled_data_list is not None and isinstance(
          self.__cached_sampled_data_list, _typing.Sequence
      ):
          return iter(
              torch.utils.data.DataLoader(
                  self._SequenceDataset(
                      self.__cached_sampled_data_list
                  ),
                  collate_fn=lambda x: x[0],
              )
          )
      else:
          return iter(self.__pyg_neighbor_sampler)
  
file_path: AutoGL/autogl/module/train/sampling/sampler/neighbor_sampler.py
imports: import typing
  import torch.utils.data
  import torch_geometric
  from .target_dependant_sampler import TargetDependantSampler, TargetDependantSampledData
label_desc: Use image node_id 4 for calling the NeighborSampler obj's underlying member method code with example usage: obj.__iter__() and returns: iter, iter