code: def test_get_npy_dim(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)
              assert internal.get_npy_dim(file_name) == 2
          elif fmt == "torch":
              torch.save(torch.from_numpy(data), file_name)
              with pytest.raises(ValueError):
                  internal.get_npy_dim(file_name)
          data = None
  
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 5 for calling a global function with example usage: test_get_npy_dim(fmt) without return types