code: def test_read_edges_error():
      # 1. Unsupported file format.
      with pytest.raises(
          AssertionError,
          match="`numpy` or `csv` is expected when reading edges but got `fake-type`.",
      ):
          internal.read_edges("test_dir", "fake-type", "edge_path")
  
      # 2. Unexpected shape of numpy array
      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, nodes], axis=1)
          os.makedirs(os.path.join(test_dir, "edges"), exist_ok=True)
          # 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)
          with pytest.raises(
              AssertionError,
              match=re.escape(
                  "The shape of edges should be (2, N), but got torch.Size([3, 200])."
              ),
          ):
              internal.read_edges(test_dir, "numpy", edge_path)
  
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 8 for calling a global function with example usage: test_read_edges_error() without return types