code: def test_cugraphstore_basic_apis():
      num_nodes_dict = {"drug": 3, "gene": 2, "disease": 1}
      # edges
      drug_interacts_drug_df = cudf.DataFrame(
          {"src": [0, 1], "dst": [1, 2]}
      )
      drug_interacts_gene = cudf.DataFrame(
          {"src": [0, 1], "dst": [0, 1]}
      )
      drug_treats_disease = cudf.DataFrame({"src": [1], "dst": [0]})
      data_dict = {
          ("drug", "interacts", "drug"): drug_interacts_drug_df,
          ("drug", "interacts", "gene"): drug_interacts_gene,
          ("drug", "treats", "disease"): drug_treats_disease,
      }
      gs = CuGraphStorage(
          data_dict=data_dict, num_nodes_dict=num_nodes_dict
      )
      # add node data
      gs.add_node_data(
          ntype="drug",
          feat_name="node_feat",
          feat_obj=th.as_tensor([0.1, 0.2, 0.3], dtype=th.float64),
      )
      # add edge data
      gs.add_edge_data(
          canonical_etype=("drug", "interacts", "drug"),
          feat_name="edge_feat",
          feat_obj=th.as_tensor([0.2, 0.4], dtype=th.float64),
      )
  
      assert gs.num_nodes() == 6
  
      assert gs.num_edges(("drug", "interacts", "drug")) == 2
      assert gs.num_edges(("drug", "interacts", "gene")) == 2
      assert gs.num_edges(("drug", "treats", "disease")) == 1
  
      node_feat = (
          gs.get_node_storage(key="node_feat", ntype="drug")
          .fetch([0, 1, 2])
          .to("cpu")
          .numpy()
      )
      np.testing.assert_equal(node_feat, np.asarray([0.1, 0.2, 0.3]))
  
      edge_feat = (
          gs.get_edge_storage(
              key="edge_feat", etype=("drug", "interacts", "drug")
          )
          .fetch([0, 1])
          .to("cpu")
          .numpy()
      )
      np.testing.assert_equal(edge_feat, np.asarray([0.2, 0.4]))
  
file_path: cugraph/python/cugraph-dgl/tests/test_cugraph_storage.py
imports: import pytest
  from cugraph.utilities.utils import import_optional
  import cudf
  import numpy
  from cugraph_dgl import CuGraphStorage
  from .utils import assert_same_sampling_len
label_desc: Use image node_id 2 for calling a global function with example usage: test_cugraphstore_basic_apis() without return types