code: def is_number(dtype):
      try:
          if (
              dtype in (float, int, complex, bool)
              and not is_numpy_generic_class(dtype)
              and not is_numpy_number_dtype(dtype)
          ):
              return True
          return False
      except:
          return False
  
file_path: fastNLP/fastNLP/core/collators/padders/utils.py
imports: from typing import Sequence, List
  import re
  from inspect import isclass
  import numpy
label_desc: Use image node_id 8 for calling a global function with example usage: is_number(dtype) and returns: False, True, False