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, indexed_slices.IndexedSlices
      ) or tensor_util.is_tf_type(x):
          return _to_numpy_type(x.dtype)
      if isinstance(x, dtypes.DType):
          return x.as_numpy_dtype
      if isinstance(x, (list, tuple)):
          raise ValueError(
              "Cannot find dtype for type inference from argument `x` of a sequence "
              f"type {type(x)}. For sequences, please call this function on each "
              "element individually."
          )
      return x
  
imports: import inspect
  import numbers
  import os
  import re
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import flexible_dtypes
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.numpy_ops import np_arrays
  from tensorflow.python.ops.numpy_ops import np_dtypes
  from tensorflow.python.types import core
  from tensorflow.python.util import nest
  from tensorflow.python.util import tf_export
label_desc: Use image node_id 24 for calling a global function with example usage: _maybe_get_dtype(x) and returns: x, x, _to_numpy_type, x