code: def test_read_edges(edge_fmt):
      with tempfile.TemporaryDirectory() as test_dir:
          num_nodes = 40
          num_edges = 200
          nodes = np.repeat(np.arange(num_nodes), 5)
          neighbors = np.random.randint(0, num_nodes, size=(num_edges))
          edges = np.stack([nodes, neighbors], axis=1)
          os.makedirs(os.path.join(test_dir, "edges"), exist_ok=True)
          if edge_fmt == "csv":
              # Wrtie into edges/edge.csv
              edges = pd.DataFrame(edges, columns=["src", "dst"])
              edge_path = os.path.join("edges", "edge.csv")
              edges.to_csv(
                  os.path.join(test_dir, edge_path),
                  index=False,
                  header=False,
              )
          else:
              # Wrtie into edges/edge.npy
              edges = edges.T
              edge_path = os.path.join("edges", "edge.npy")
              np.save(os.path.join(test_dir, edge_path), edges)
          src, dst = internal.read_edges(test_dir, edge_fmt, edge_path)
          assert src.all() == nodes.all()
          assert dst.all() == neighbors.all()
  
file_path: dgl/tests/python/pytorch/graphbolt/utils/test_internal.py
imports: import json
  import os
  import re
  import tempfile
  import dgl.graphbolt.internal
  import numpy
  import pandas
  import pytest
  import torch
label_desc: Use image node_id 7 for calling a global function with example usage: test_read_edges(edge_fmt) without return types