class_docstr: Defines the attributes of a :obj:`GraphStore` edge.
  It holds all the parameters necessary to uniquely identify an edge from
  the :class:`GraphStore`.
  
  Note that the order of the attributes is important; this is the order in
  which attributes must be provided for indexing calls. :class:`GraphStore`
  implementations can define a different ordering by overriding
  :meth:`EdgeAttr.__init__`.
class_docstr_tok: ["Defines","the","attributes","of","a",":","obj",":","`","GraphStore","`","edge",".","It","holds","all","the","parameters","necessary","to","uniquely","identify","an","edge","from","the",":","class",":","`","GraphStore","`",".","Note","that","the","order","of","the","attributes","is","important",";","this","is","the","order","in","which","attributes","must","be","provided","for","indexing","calls",".",":","class",":","`","GraphStore","`","implementations","can","define","a","different","ordering","by","overriding",":","meth",":","`","EdgeAttr.__init__","`","."]
code: def __init__(
      self,
      edge_type: EdgeType,
      layout: EdgeLayout,
      is_sorted: bool = False,
      size: Optional[Tuple[int, int]] = None,
  ):
      layout = EdgeLayout(layout)
  
      if layout == EdgeLayout.CSR and is_sorted:
          raise ValueError(
              "Cannot create a 'CSR' edge attribute with "
              "option 'is_sorted=True'"
          )
  
      if layout == EdgeLayout.CSC:
          is_sorted = True
  
      self.edge_type = edge_type
      self.layout = layout
      self.is_sorted = is_sorted
      self.size = size
  
imports: import copy
  from abc import abstractmethod
  from collections import defaultdict
  from dataclasses import dataclass
  from enum import Enum
  from typing import Any, Dict, List, Optional, Tuple
  from torch import Tensor
  from torch_geometric.typing import EdgeTensorType, EdgeType, OptTensor
  from torch_geometric.utils import index_sort
  from torch_geometric.utils.mixin import CastMixin
  from torch_geometric.utils.sparse import index2ptr, ptr2index
label_desc: Use image node_id 1 to create a new EdgeAttr object from inherited base classes: CastMixin with example: obj = EdgeAttr(edge_type, layout, is_sorted, size)