code: def _get_dtype(ele_dtype, dtype, class_name):
      """
      用于检测数据的 dtype 类型， 根据内部和外部数据判断。
  
      :param ele_dtype: 内部数据的类型
      :param dtype:  数据外部类型
      :param class_name: 类的名称
      """
      if ele_dtype is not None and not is_number_or_numpy_number(
          ele_dtype
      ):
          raise EleDtypeUnsupportedError(
              f"`{class_name}` only supports padding python numbers "
              f"or numpy numbers but get `{ele_dtype}`."
          )
  
      if dtype is None:
          dtype = ele_dtype
      else:
          if not is_number_or_numpy_number(dtype):
              raise DtypeUnsupportedError(
                  f"The dtype of `{class_name}` only supports python numbers "
                  f"or numpy numbers but get `{dtype}`."
              )
          dtype = dtype
      return dtype
  
file_path: fastNLP/fastNLP/core/collators/padders/numpy_padder.py
imports: from numbers import Number
  from abc import ABC
  from typing import Any, Union
  import numpy
  from .padder import Padder
  from .utils import get_padded_numpy_array, is_number_or_numpy_number
  from .exceptions import *
label_desc: Use image node_id 1 for calling a global function with example usage: _get_dtype(ele_dtype, dtype, class_name) and returns: dtype