class_docstr: This class implements the :class:`torch_geometric.data.FeatureStore`
  interface to act as a local feature store for distributed training.
docstr: Creates a local graph store from heterogeneous :pyg:`PyG` tensors.
  
  Args:
      node_id_dict (Dict[NodeType, torch.Tensor]): The global identifier
          for every local node of every node type.
      x_dict (Dict[NodeType, torch.Tensor], optional): The node features
          of node types. (default: :obj:`None`)
      y_dict (Dict[NodeType, torch.Tensor], optional): The node labels of
          node types. (default: :obj:`None`)
      edge_id_dict (Dict[EdgeType, torch.Tensor], optional): The global
          identifier for every local edge of edge types.
          (default: :obj:`None`)
      edge_attr_dict (Dict[EdgeType, torch.Tensor], optional): The edge
          features of edge types. (default: :obj:`None`)
docstr_tok: ["Creates","a","local","graph","store","from","heterogeneous",":","pyg",":","`","PyG","`","tensors",".","Args",":","node_id_dict","(","Dict","[","NodeType",",","torch.Tensor","]",")",":","The","global","identifier","for","every","local","node","of","every","node","type",".","x_dict","(","Dict","[","NodeType",",","torch.Tensor","]",",","optional",")",":","The","node","features","of","node","types",".","(","default",":",":","obj",":","`","None","`",")","y_dict","(","Dict","[","NodeType",",","torch.Tensor","]",",","optional",")",":","The","node","labels","of","node","types",".","(","default",":",":","obj",":","`","None","`",")","edge_id_dict","(","Dict","[","EdgeType",",","torch.Tensor","]",",","optional",")",":","The","global","identifier","for","every","local","edge","of","edge","types",".","(","default",":",":","obj",":","`","None","`",")","edge_attr_dict","(","Dict","[","EdgeType",",","torch.Tensor","]",",","optional",")",":","The","edge","features","of","edge","types",".","(","default",":",":","obj",":","`","None","`",")"]
code: def from_hetero_data(
      cls,
      node_id_dict: Dict[NodeType, Tensor],
      x_dict: Optional[Dict[NodeType, Tensor]] = None,
      y_dict: Optional[Dict[NodeType, Tensor]] = None,
      edge_id_dict: Optional[Dict[EdgeType, Tensor]] = None,
      edge_attr_dict: Optional[Dict[EdgeType, Tensor]] = None,
  ) -> "LocalFeatureStore":
      r"""Creates a local graph store from heterogeneous :pyg:`PyG` tensors.
  
      Args:
          node_id_dict (Dict[NodeType, torch.Tensor]): The global identifier
              for every local node of every node type.
          x_dict (Dict[NodeType, torch.Tensor], optional): The node features
              of node types. (default: :obj:`None`)
          y_dict (Dict[NodeType, torch.Tensor], optional): The node labels of
              node types. (default: :obj:`None`)
          edge_id_dict (Dict[EdgeType, torch.Tensor], optional): The global
              identifier for every local edge of edge types.
              (default: :obj:`None`)
          edge_attr_dict (Dict[EdgeType, torch.Tensor], optional): The edge
              features of edge types. (default: :obj:`None`)
      """
      feat_store = cls()
  
      for node_type, node_id in node_id_dict.items():
          feat_store.put_global_id(node_id, group_name=node_type)
      if x_dict is not None:
          for node_type, x in x_dict.items():
              feat_store.put_tensor(
                  x, group_name=node_type, attr_name="x"
              )
      if y_dict is not None:
          for node_type, y in y_dict.items():
              feat_store.put_tensor(
                  y, group_name=node_type, attr_name="y"
              )
      if edge_id_dict is not None:
          for edge_type, edge_id in edge_id_dict.items():
              feat_store.put_global_id(edge_id, group_name=edge_type)
      if edge_attr_dict is not None:
          for edge_type, edge_attr in edge_attr_dict.items():
              if edge_id_dict is None or edge_type not in edge_id_dict:
                  raise ValueError(
                      "'edge_id' needs to be present in case "
                      "'edge_attr' is passed"
                  )
              feat_store.put_tensor(
                  edge_attr, group_name=edge_type, attr_name="edge_attr"
              )
  
      return feat_store
  
imports: import copy
  import json
  import os.path
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor
  from torch_geometric.data import FeatureStore, TensorAttr
  from torch_geometric.data.feature_store import _FieldStatus
  from torch_geometric.distributed.rpc import RPCCallBase, RPCRouter, rpc_async, rpc_register
  from torch_geometric.typing import EdgeType, NodeOrEdgeType, NodeType
label_desc: Use image node_id 20 for calling the LocalFeatureStore obj's underlying member method code with example usage: obj.from_hetero_data(cls, node_id_dict, x_dict, y_dict, edge_id_dict, edge_attr_dict) and returns: feat_store