code: def _test_CSVDataset_multiple():
      with tempfile.TemporaryDirectory() as test_dir:
          # generate YAML/CSVs
          meta_yaml_path = os.path.join(test_dir, "meta.yaml")
          edges_csv_path_0 = os.path.join(test_dir, "test_edges_0.csv")
          edges_csv_path_1 = os.path.join(test_dir, "test_edges_1.csv")
          nodes_csv_path_0 = os.path.join(test_dir, "test_nodes_0.csv")
          nodes_csv_path_1 = os.path.join(test_dir, "test_nodes_1.csv")
          graph_csv_path = os.path.join(test_dir, "test_graph.csv")
          meta_yaml_data = {
              "version": "1.0.0",
              "dataset_name": "default_name",
              "node_data": [
                  {
                      "file_name": os.path.basename(nodes_csv_path_0),
                      "ntype": "user",
                  },
                  {
                      "file_name": os.path.basename(nodes_csv_path_1),
                      "ntype": "item",
                  },
              ],
              "edge_data": [
                  {
                      "file_name": os.path.basename(edges_csv_path_0),
                      "etype": ["user", "follow", "user"],
                  },
                  {
                      "file_name": os.path.basename(edges_csv_path_1),
                      "etype": ["user", "like", "item"],
                  },
              ],
              "graph_data": {
                  "file_name": os.path.basename(graph_csv_path)
              },
          }
          with open(meta_yaml_path, "w") as f:
              yaml.dump(meta_yaml_data, f, sort_keys=False)
          num_nodes = 100
          num_edges = 500
          num_graphs = 10
          num_dims = 3
          feat_ndata = np.random.rand(num_nodes * num_graphs, num_dims)
          label_ndata = np.random.randint(
              2, size=num_nodes * num_graphs
          )
          df = pd.DataFrame(
              {
                  "node_id": np.hstack(
                      [np.arange(num_nodes) for _ in range(num_graphs)]
                  ),
                  "label": label_ndata,
                  "feat": [line.tolist() for line in feat_ndata],
                  "graph_id": np.hstack(
                      [np.full(num_nodes, i) for i in range(num_graphs)]
                  ),
              }
          )
          df.to_csv(nodes_csv_path_0, index=False)
          df.to_csv(nodes_csv_path_1, index=False)
          feat_edata = np.random.rand(num_edges * num_graphs, num_dims)
          label_edata = np.random.randint(
              2, size=num_edges * num_graphs
          )
          df = pd.DataFrame(
              {
                  "src_id": np.hstack(
                      [
                          np.random.randint(num_nodes, size=num_edges)
                          for _ in range(num_graphs)
                      ]
                  ),
                  "dst_id": np.hstack(
                      [
                          np.random.randint(num_nodes, size=num_edges)
                          for _ in range(num_graphs)
                      ]
                  ),
                  "label": label_edata,
                  "feat": [line.tolist() for line in feat_edata],
                  "graph_id": np.hstack(
                      [np.full(num_edges, i) for i in range(num_graphs)]
                  ),
              }
          )
          df.to_csv(edges_csv_path_0, index=False)
          df.to_csv(edges_csv_path_1, index=False)
          feat_gdata = np.random.rand(num_graphs, num_dims)
          label_gdata = np.random.randint(2, size=num_graphs)
          df = pd.DataFrame(
              {
                  "label": label_gdata,
                  "feat": [line.tolist() for line in feat_gdata],
                  "graph_id": np.arange(num_graphs),
              }
          )
          df.to_csv(graph_csv_path, index=False)
  
          # load CSVDataset with default node/edge/gdata_parser
          for force_reload in [True, False]:
              if not force_reload:
                  # remove original node data file to verify reload from cached files
                  os.remove(nodes_csv_path_0)
                  assert not os.path.exists(nodes_csv_path_0)
              csv_dataset = data.CSVDataset(
                  test_dir, force_reload=force_reload
              )
              assert len(csv_dataset) == num_graphs
              assert csv_dataset.has_cache()
              assert len(csv_dataset.data) == 2
              assert "feat" in csv_dataset.data
              assert "label" in csv_dataset.data
              assert F.array_equal(
                  F.tensor(feat_gdata, dtype=F.float32),
                  csv_dataset.data["feat"],
              )
              for i, (g, g_data) in enumerate(csv_dataset):
                  assert not g.is_homogeneous
                  assert F.asnumpy(g_data["label"]) == label_gdata[i]
                  assert F.array_equal(
                      g_data["feat"],
                      F.tensor(feat_gdata[i], dtype=F.float32),
                  )
                  for ntype in g.ntypes:
                      assert g.num_nodes(ntype) == num_nodes
                      assert F.array_equal(
                          F.tensor(
                              feat_ndata[
                                  i * num_nodes : (i + 1) * num_nodes
                              ],
                              dtype=F.float32,
                          ),
                          g.nodes[ntype].data["feat"],
                      )
                      assert np.array_equal(
                          label_ndata[
                              i * num_nodes : (i + 1) * num_nodes
                          ],
                          F.asnumpy(g.nodes[ntype].data["label"]),
                      )
                  for etype in g.etypes:
                      assert g.num_edges(etype) == num_edges
                      assert F.array_equal(
                          F.tensor(
                              feat_edata[
                                  i * num_edges : (i + 1) * num_edges
                              ],
                              dtype=F.float32,
                          ),
                          g.edges[etype].data["feat"],
                      )
                      assert np.array_equal(
                          label_edata[
                              i * num_edges : (i + 1) * num_edges
                          ],
                          F.asnumpy(g.edges[etype].data["label"]),
                      )
  
imports: import gzip
  import io
  import os
  import tarfile
  import tempfile
  import unittest
  import warnings
  import backend
  import dgl
  import dgl.data
  import numpy
  import pandas
  import pytest
  import yaml
  from dgl import DGLError
label_desc: Use image node_id 27 for calling a global function with example usage: _test_CSVDataset_multiple() without return types