code: def _maybe_get_dtype(x):
      """Returns a numpy type if available from x. Skips if x is numpy.ndarray."""
      # Don't put np.ndarray in this list, because np.result_type looks at the
      # value (not just dtype) of np.ndarray to decide the result type.
      if isinstance(x, numbers.Real):
          return x
      if isinstance(x, tensor_lib.Tensor):
          return x.dtype.as_numpy_dtype
      if isinstance(x, dtypes.DType):
          return x.as_numpy_dtype
      if isinstance(x, tensor_shape.TensorShape):
          return np.int32
      if isinstance(x, (list, tuple)):
          raise ValueError(
              f"Cannot determine dtype.  Got sequence {x}."
          )
      return x
  
file_path: tensorflow/tensorflow/python/framework/override_binary_operator.py
imports: import numbers
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import gen_math_ops
  from tensorflow.python.ops.numpy_ops import np_dtypes
  from tensorflow.python.util import nest
  from tensorflow.python.util import traceback_utils
label_desc: Use image node_id 1 for calling a global function with example usage: _maybe_get_dtype(x) and returns: x, x, x, x, np