code: def _get_dtype(ele_dtype, dtype, class_name):
      """
      用于检测数据的 dtype 类型， 根据内部和外部数据判断。
  
      :param ele_dtype 内部数据的类型
      :param dtype  数据外部类型
      :param class_name 类的名称
      """
      if not (
          ele_dtype is None
          or (
              is_number_or_numpy_number(ele_dtype)
              or is_jittor_tensor(ele_dtype)
              or is_jittor_dtype_str(dtype)
          )
      ):
          raise EleDtypeUnsupportedError(
              f"`{class_name}` only supports padding python numbers "
              f"or numpy numbers or jittor.Var but get `{ele_dtype}`."
          )
  
      if dtype is not None:
          if not (
              is_jittor_tensor(dtype)
              or is_number(dtype)
              or is_jittor_dtype_str(dtype)
          ):
              raise DtypeUnsupportedError(
                  f"The dtype of `{class_name}` only supports python numbers "
                  f"or jittor.dtype but get `{dtype}`."
              )
      else:
          if is_numpy_generic_class(ele_dtype):
              dtype = numpy_to_jittor_dtype_dict.get(ele_dtype)
          else:
              dtype = ele_dtype
  
      return dtype
  
imports: from inspect import isclass
  import numpy
  from fastNLP.envs.imports import _NEED_IMPORT_JITTOR
  from .padder import Padder
  from .utils import is_number_or_numpy_number, is_number, is_numpy_number_dtype, get_shape, is_numpy_generic_class
  from .exceptions import *
label_desc: Use image node_id 3 for calling a global function with example usage: _get_dtype(ele_dtype, dtype, class_name) and returns: dtype