code: def get_tf_dtype(dtype):  # pylint: disable=too-many-return-statements
      """Returns equivalent tf dtype.
  
      Args:
          dtype: A str, python numeric or string type, numpy data type, or
              tf dtype.
  
      Returns:
          The corresponding tf dtype.
      """
      if dtype in {
          "float",
          "float32",
          "tf.float32",
          float,
          np.float32,
          tf.float32,
      }:
          return tf.float32
      elif dtype in {
          "float64",
          "tf.float64",
          np.float64,
          np.float_,
          tf.float64,
      }:
          return tf.float64
      elif dtype in {"float16", "tf.float16", np.float16, tf.float16}:
          return tf.float16
      elif dtype in {
          "int",
          "int32",
          "tf.int32",
          int,
          np.int32,
          tf.int32,
      }:
          return tf.int32
      elif dtype in {"int64", "tf.int64", np.int64, tf.int64}:
          return tf.int64
      elif dtype in {"int16", "tf.int16", np.int16, tf.int16}:
          return tf.int16
      elif dtype in {"bool", "tf.bool", bool, np.bool_, tf.bool}:
          return tf.bool
      elif dtype in {
          "string",
          "str",
          "tf.string",
          str,
          np.str,
          tf.string,
      }:
          return tf.string
      try:
          if dtype == {"unicode", unicode}:
              return tf.string
      except NameError:
          pass
  
      raise ValueError(
          "Unsupported conversion from type {} to tf dtype".format(
              str(dtype)
          )
      )
  
file_path: texar/texar/tf/utils/dtypes.py
imports: import six
  import numpy
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: get_tf_dtype(dtype) and returns: tf, tf, tf, tf, tf, tf, tf, tf, tf