code: def test_read_data(fmt):
      with tempfile.TemporaryDirectory() as test_dir:
          data = np.array([[1, 2, 4], [2, 5, 3]])
          type_name = "pt" if fmt == "torch" else "npy"
          file_name = os.path.join(test_dir, f"save_data.{type_name}")
          if fmt == "numpy":
              np.save(file_name, data)
          elif fmt == "torch":
              torch.save(torch.from_numpy(data), file_name)
          read_tensor = internal.read_data(file_name, fmt)
          assert torch.equal(torch.from_numpy(data), read_tensor)
  
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 3 for calling a global function with example usage: test_read_data(fmt) without return types