code: def base_dtype(dtype):
      """Returns a non-reference `dtype` based on this `dtype`."""
      dtype = None if dtype is None else tf.as_dtype(dtype)
      if hasattr(dtype, "base_dtype"):
          return dtype.base_dtype
      return dtype
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.util import nest
label_desc: Use image node_id 3 for calling a global function with example usage: base_dtype(dtype) and returns: dtype, dtype