class_docstr: Duck-typed version of PyG's GraphStore and FeatureStore.
class_docstr_tok: ["Duck-typed","version","of","PyG","'s","GraphStore","and","FeatureStore","."]
docstr: Constructs a new CuGraphStore from the provided
  arguments.
  
  Parameters
  ----------
  F: cugraph.gnn.FeatureStore (Required)
      The feature store containing this graph's features.
      Typed lexicographic-ordered numbering convention
      should match that of the graph.
  
  G: dict[str, tuple[TensorType]] or dict[str, int] (Required)
      Dictionary of edge indices.
      Option 1 (graph in memory):
  
          Pass the edge indices: i.e.
          {
          ('author', 'writes', 'paper'): [[0,1,2],[2,0,1]],
          ('author', 'affiliated', 'institution'): [[0,1],[0,1]]
          }
  
  
      Option 2 (graph not in memory):
  
          Pass the number of edges: i.e.
          {
          ('author', 'writes', 'paper'): 2,
          ('author', 'affiliated', 'institution'): 2
          }
          If the graph is not in memory, manipulating the edge indices
          or calling sampling is not possible.  This is for cases where
          sampling has already been done and samples were written to disk.
  
      Note: the internal cugraph representation will use
      offsetted vertex and edge ids.
  
  num_nodes_dict: dict (Required)
      A dictionary mapping each node type to the count of nodes
      of that type in the graph.
  
  multi_gpu: bool (Optional, default = False)
      Whether the store should be backed by a multi-GPU graph.
      Requires dask to have been set up.
  
  order: str (Optional ["CSR", "CSC"], default = CSR)
      The order to use for sampling.  CSR corresponds to the
      standard OGB dataset order that is usually used in PyG.
      CSC order constructs the same graph as CSR, but with
      edges in the opposite direction.
docstr_tok: ["Constructs","a","new","CuGraphStore","from","the","provided","arguments",".","Parameters","--","--","--","--","--","F",":","cugraph.gnn.FeatureStore","(","Required",")","The","feature","store","containing","this","graph","'s","features",".","Typed","lexicographic-ordered","numbering","convention","should","match","that","of","the","graph",".","G",":","dict","[","str",",","tuple","[","TensorType","]","]","or","dict","[","str",",","int","]","(","Required",")","Dictionary","of","edge","indices",".","Option","1","(","graph","in","memory",")",":","Pass","the","edge","indices",":","i.e",".","{","(","'author","'",",","'writes","'",",","'paper","'",")",":","[","[","0,1,2","]",",","[","2,0,1","]","]",",","(","'author","'",",","'affiliated","'",",","'institution","'",")",":","[","[","0,1","]",",","[","0,1","]","]","}","Option","2","(","graph","not","in","memory",")",":","Pass","the","number","of","edges",":","i.e",".","{","(","'author","'",",","'writes","'",",","'paper","'",")",":","2",",","(","'author","'",",","'affiliated","'",",","'institution","'",")",":","2","}","If","the","graph","is","not","in","memory",",","manipulating","the","edge","indices","or","calling","sampling","is","not","possible",".","This","is","for","cases","where","sampling","has","already","been","done","and","samples","were","written","to","disk",".","Note",":","the","internal","cugraph","representation","will","use","offsetted","vertex","and","edge","ids",".","num_nodes_dict",":","dict","(","Required",")","A","dictionary","mapping","each","node","type","to","the","count","of","nodes","of","that","type","in","the","graph",".","multi_gpu",":","bool","(","Optional",",","default","=","False",")","Whether","the","store","should","be","backed","by","a","multi-GPU","graph",".","Requires","dask","to","have","been","set","up",".","order",":","str","(","Optional","[","``","CSR","''",",","``","CSC","''","]",",","default","=","CSR",")","The","order","to","use","for","sampling",".","CSR","corresponds","to","the","standard","OGB","dataset","order","that","is","usually","used","in","PyG",".","CSC","order","constructs","the","same","graph","as","CSR",",","but","with","edges","in","the","opposite","direction","."]
code: def __init__(
      self,
      F: cugraph.gnn.FeatureStore,
      G: Union[
          Dict[Tuple[str, str, str], Tuple[TensorType]],
          Dict[Tuple[str, str, str], int],
      ],
      num_nodes_dict: Dict[str, int],
      *,
      multi_gpu: bool = False,
      order: str = "CSR",
  ):
      """
      Constructs a new CuGraphStore from the provided
      arguments.
  
      Parameters
      ----------
      F: cugraph.gnn.FeatureStore (Required)
          The feature store containing this graph's features.
          Typed lexicographic-ordered numbering convention
          should match that of the graph.
  
      G: dict[str, tuple[TensorType]] or dict[str, int] (Required)
          Dictionary of edge indices.
          Option 1 (graph in memory):
  
              Pass the edge indices: i.e.
              {
              ('author', 'writes', 'paper'): [[0,1,2],[2,0,1]],
              ('author', 'affiliated', 'institution'): [[0,1],[0,1]]
              }
  
  
          Option 2 (graph not in memory):
  
              Pass the number of edges: i.e.
              {
              ('author', 'writes', 'paper'): 2,
              ('author', 'affiliated', 'institution'): 2
              }
              If the graph is not in memory, manipulating the edge indices
              or calling sampling is not possible.  This is for cases where
              sampling has already been done and samples were written to disk.
  
          Note: the internal cugraph representation will use
          offsetted vertex and edge ids.
  
      num_nodes_dict: dict (Required)
          A dictionary mapping each node type to the count of nodes
          of that type in the graph.
  
      multi_gpu: bool (Optional, default = False)
          Whether the store should be backed by a multi-GPU graph.
          Requires dask to have been set up.
  
      order: str (Optional ["CSR", "CSC"], default = CSR)
          The order to use for sampling.  CSR corresponds to the
          standard OGB dataset order that is usually used in PyG.
          CSC order constructs the same graph as CSR, but with
          edges in the opposite direction.
      """
  
      if None in G:
          raise ValueError("Unspecified edge types not allowed in PyG")
  
      if order != "CSR" and order != "CSC":
          raise ValueError("invalid valid for order")
  
      self.__vertex_dtype = torch.int64
  
      self._tensor_attr_cls = CuGraphTensorAttr
      self._tensor_attr_dict = defaultdict(list)
  
      construct_graph = True
      if isinstance(next(iter(G.values())), int):
          # User has passed in the number of edges
          # (not the actual edge index), so the number of edges
          # does not need to be counted.
          num_edges_dict = dict(
              G
          )  # make sure the cugraph store owns this dict
          construct_graph = False
      else:
          # User has passed in the actual edge index, so the
          # number of edges needs to be counted.
          num_edges_dict = {
              pyg_can_edge_type: len(ei[0])
              for pyg_can_edge_type, ei in G.items()
          }
  
      self.__infer_offsets(num_nodes_dict, num_edges_dict)
      self.__infer_existing_tensors(F)
      self.__infer_edge_types(num_nodes_dict, num_edges_dict)
  
      self._edge_attr_cls = CuGraphEdgeAttr
  
      self.__features = F
      self.__graph = None
      self.__is_graph_owner = False
      self.__order = order
  
      if construct_graph:
          if multi_gpu:
              self.__graph = distributed.get_client().get_dataset(
                  "cugraph_graph", default=None
              )
  
          if self.__graph is None:
              self.__graph = self.__construct_graph(
                  G, multi_gpu=multi_gpu, order=order
              )
              self.__is_graph_owner = True
  
      self.__subgraphs = {}
  
imports: from typing import Optional, Tuple, Any, Union, List, Dict
  from enum import Enum, auto
  from dataclasses import dataclass
  from collections import defaultdict
  from itertools import chain
  from functools import cached_property
  import numpy
  import cupy
  import pandas
  import cudf
  import cugraph
  import warnings
  import dask.array
  import dask.dataframe
  import dask.distributed
  import dask_cudf
  from cugraph.utilities.utils import import_optional, MissingModule
label_desc: Use image node_id 1 to create a new CuGraphStore object  with example: obj = CuGraphStore(F, G, num_nodes_dict)