code: def test_is_number_or_numpy_number():
      assert is_number_or_numpy_number(type(3)) is True
      assert is_number_or_numpy_number(type(3.1)) is True
      assert is_number_or_numpy_number(type(True)) is True
      assert is_number_or_numpy_number(type("3")) is False
      assert is_number_or_numpy_number(np.zeros(3).dtype) is True
      assert (
          is_number_or_numpy_number(np.zeros(3, dtype=int).dtype)
          is True
      )
      assert (
          is_number_or_numpy_number(np.zeros(3, dtype=object).dtype)
          is False
      )
  
      if _NEED_IMPORT_TORCH:
          import torch
  
          dtype = torch.ones(3).dtype
          assert is_number_or_numpy_number(dtype) is False
  
file_path: fastNLP/tests/core/collators/padders/test_utils.py
imports: import pytest
  import numpy
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
  from fastNLP.core.collators.padders.utils import get_shape, get_padded_numpy_array, get_padded_nest_list, is_number_or_numpy_number, is_numpy_number_dtype, is_number
label_desc: Use image node_id 4 for calling a global function with example usage: test_is_number_or_numpy_number() without return types