code: def read_edges(dataset_dir, edge_fmt, edge_path):
      """Read egde data from numpy or csv."""
      assert edge_fmt in [
          "numpy",
          "csv",
      ], f"`numpy` or `csv` is expected when reading edges but got `{edge_fmt}`."
      if edge_fmt == "numpy":
          edge_data = read_data(
              os.path.join(dataset_dir, edge_path),
              edge_fmt,
          )
          assert (
              edge_data.shape[0] == 2 and len(edge_data.shape) == 2
          ), f"The shape of edges should be (2, N), but got {edge_data.shape}."
          src, dst = edge_data.numpy()
      else:
          edge_data = pd.read_csv(
              os.path.join(dataset_dir, edge_path),
              names=["src", "dst"],
          )
          src, dst = (
              edge_data["src"].to_numpy(),
              edge_data["dst"].to_numpy(),
          )
      return (src, dst)
  
file_path: dgl/python/dgl/graphbolt/internal/utils.py
imports: import hashlib
  import json
  import os
  import shutil
  from typing import List, Union
  import numpy
  import pandas
  import torch
  from numpy.lib.format import read_array_header_1_0, read_array_header_2_0
label_desc: Use image node_id 8 for calling a global function with example usage: read_edges(dataset_dir, edge_fmt, edge_path) and returns: src,  dst