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 homogeneous or heterogenous
  :pyg:`PyG` graph.
  
  Args:
      edge_id (torch.Tensor): The global identifier for every local edge.
      edge_index (torch.Tensor): The local edge indices.
      num_nodes (int): The number of nodes in the local graph.
      is_sorted (bool): Indicate if edge_index is sorted on col/dst_node
          (CSC format). (default: :obj:`False`)
docstr_tok: ["Creates","a","local","graph","store","from","a","homogeneous","or","heterogenous",":","pyg",":","`","PyG","`","graph",".","Args",":","edge_id","(","torch.Tensor",")",":","The","global","identifier","for","every","local","edge",".","edge_index","(","torch.Tensor",")",":","The","local","edge","indices",".","num_nodes","(","int",")",":","The","number","of","nodes","in","the","local","graph",".","is_sorted","(","bool",")",":","Indicate","if","edge_index","is","sorted","on","col\/dst_node","(","CSC","format",")",".","(","default",":",":","obj",":","`","False","`",")"]
code: def from_data(
      cls,
      edge_id: Tensor,
      edge_index: Tensor,
      num_nodes: int,
      is_sorted: bool = False,
  ) -> "LocalGraphStore":
      r"""Creates a local graph store from a homogeneous or heterogenous
      :pyg:`PyG` graph.
  
      Args:
          edge_id (torch.Tensor): The global identifier for every local edge.
          edge_index (torch.Tensor): The local edge indices.
          num_nodes (int): The number of nodes in the local graph.
          is_sorted (bool): Indicate if edge_index is sorted on col/dst_node
              (CSC format). (default: :obj:`False`)
      """
      graph_store = cls()
      graph_store.meta = {"is_hetero": False}
  
      if not is_sorted:
          edge_index, edge_id = sort_edge_index(
              edge_index,
              edge_id,
              sort_by_row=False,
          )
  
      attr = dict(
          edge_type=None,
          layout="coo",
          size=(num_nodes, num_nodes),
          is_sorted=True,
      )
  
      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 12 for calling the LocalGraphStore obj's underlying member method code with example usage: obj.from_data(cls, edge_id, edge_index, num_nodes, is_sorted) and returns: graph_store