class_docstr: This class implements the :class:`torch_geometric.data.GraphStore`
  interface to act as a local graph store for distributed training.
docstr: Creates a local graph store from a heterogeneous :pyg:`PyG` graph.
  
  Args:
      edge_id_dict (Dict[EdgeType, torch.Tensor]): The global identifier
          for every local edge of every edge type.
      edge_index_dict (Dict[EdgeType, torch.Tensor]): The local edge
          indices of every edge type.
      num_nodes_dict: (Dict[str, int]): The number of nodes for every
          node type.
      is_sorted (bool): Indicate if edge_index is sorted on col/dst_node
          (CSC format)
docstr_tok: ["Creates","a","local","graph","store","from","a","heterogeneous",":","pyg",":","`","PyG","`","graph",".","Args",":","edge_id_dict","(","Dict","[","EdgeType",",","torch.Tensor","]",")",":","The","global","identifier","for","every","local","edge","of","every","edge","type",".","edge_index_dict","(","Dict","[","EdgeType",",","torch.Tensor","]",")",":","The","local","edge","indices","of","every","edge","type",".","num_nodes_dict",":","(","Dict","[","str",",","int","]",")",":","The","number","of","nodes","for","every","node","type",".","is_sorted","(","bool",")",":","Indicate","if","edge_index","is","sorted","on","col\/dst_node","(","CSC","format",")"]
code: def from_hetero_data(
      cls,
      edge_id_dict: Dict[EdgeType, Tensor],
      edge_index_dict: Dict[EdgeType, Tensor],
      num_nodes_dict: Dict[NodeType, int],
      is_sorted: bool = False,
  ) -> "LocalGraphStore":
      r"""Creates a local graph store from a heterogeneous :pyg:`PyG` graph.
  
      Args:
          edge_id_dict (Dict[EdgeType, torch.Tensor]): The global identifier
              for every local edge of every edge type.
          edge_index_dict (Dict[EdgeType, torch.Tensor]): The local edge
              indices of every edge type.
          num_nodes_dict: (Dict[str, int]): The number of nodes for every
              node type.
          is_sorted (bool): Indicate if edge_index is sorted on col/dst_node
              (CSC format)
      """
      graph_store = cls()
      graph_store.meta = {"is_hetero": True}
  
      for edge_type, edge_index in edge_index_dict.items():
          src, _, dst = edge_type
          attr = dict(
              edge_type=edge_type,
              layout="coo",
              size=(num_nodes_dict[src], num_nodes_dict[dst]),
              is_sorted=True,
          )
          edge_id = edge_id_dict[edge_type]
          if not is_sorted:
              edge_index, edge_id = sort_edge_index(
                  edge_index,
                  edge_id,
                  sort_by_row=False,
              )
          graph_store.put_edge_index(edge_index, **attr)
          graph_store.put_edge_id(edge_id, **attr)
      return graph_store
  
imports: import json
  import os.path
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch_geometric.data import EdgeAttr, GraphStore
  from torch_geometric.typing import EdgeTensorType, EdgeType, NodeType
  from torch_geometric.utils import sort_edge_index
label_desc: Use image node_id 13 for calling the LocalGraphStore obj's underlying member method code with example usage: obj.from_hetero_data(cls, edge_id_dict, edge_index_dict, num_nodes_dict, is_sorted) and returns: graph_store