class_docstr: An abstract base class that initializes a graph sampler and provides
  :meth:`sample_from_nodes` and :meth:`sample_from_edges` routines.
  
  .. note ::
  
      Any data stored in the sampler will be *replicated* across data loading
      workers that use the sampler since each data loading worker holds its
      own instance of a sampler.
      As such, it is recommended to limit the amount of information stored in
      the sampler.
docstr: If the sampler performs any modification of edge ordering in the
  original graph, this function is expected to return the permutation
  tensor that defines the permutation from the edges in the original
  graph and the edges used in the sampler. If no such permutation was
  applied, :obj:`None` is returned. For heterogeneous graphs, the
  expected return type is a permutation tensor for each edge type.
docstr_tok: ["If","the","sampler","performs","any","modification","of","edge","ordering","in","the","original","graph",",","this","function","is","expected","to","return","the","permutation","tensor","that","defines","the","permutation","from","the","edges","in","the","original","graph","and","the","edges","used","in","the","sampler",".","If","no","such","permutation","was","applied",",",":","obj",":","`","None","`","is","returned",".","For","heterogeneous","graphs",",","the","expected","return","type","is","a","permutation","tensor","for","each","edge","type","."]
code: def edge_permutation(
      self,
  ) -> Union[OptTensor, Dict[EdgeType, OptTensor]]:
      r"""If the sampler performs any modification of edge ordering in the
      original graph, this function is expected to return the permutation
      tensor that defines the permutation from the edges in the original
      graph and the edges used in the sampler. If no such permutation was
      applied, :obj:`None` is returned. For heterogeneous graphs, the
      expected return type is a permutation tensor for each edge type.
      """
      return None
  
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 3 for calling the BaseSampler obj's underlying member method code with example usage: obj.edge_permutation() and returns: None