code: def extract_dtype(dtype_or_object_with_dtype):
      import six
  
      if isinstance(
          dtype_or_object_with_dtype, six.string_types
      ) or isinstance(dtype_or_object_with_dtype, np.dtype):
          return np.dtype(dtype_or_object_with_dtype)
      elif hasattr(dtype_or_object_with_dtype, "dtype"):
          return np.dtype(dtype_or_object_with_dtype.dtype)
      else:
          raise ValueError(
              "unsupported type used for prox creation, "
              "expects dtype or class with dtype , type: {}".format(
                  dtype_or_object_with_dtype.__class__.__name__
              )
          )
  
imports: import numpy
  from tick.base import Base
label_desc: Use image node_id 1 for calling a global function with example usage: extract_dtype(dtype_or_object_with_dtype) and returns: np, np