code: def _to_tf_type(dtype):
      """Converts a native python or numpy type to TF DType.
  
      Args:
        dtype: Could be a python type, a numpy type or a TF DType.
  
      Returns:
        A tensorflow `DType`.
      """
      return dtypes.as_dtype(dtype)
  
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 4 for calling a global function with example usage: _to_tf_type(dtype) and returns: dtypes