code: def base_type(dtype):
      """Returns the TFRecords allowed type corresponding to dtype."""
      int_types = [
          tf.int8,
          tf.int16,
          tf.int32,
          tf.int64,
          tf.uint8,
          tf.uint16,
          tf.uint32,
          tf.uint64,
          tf.qint8,
          tf.qint16,
          tf.qint32,
          tf.bool,
      ]
      float_types = [tf.float16, tf.float32, tf.float64]
      byte_types = [tf.string, bytes]
  
      if dtype in int_types:
          new_dtype = tf.int64
      elif dtype in float_types:
          new_dtype = tf.float32
      elif dtype in byte_types:
          new_dtype = tf.string
      else:
          raise ValueError(
              f"dtype {dtype} is not a recognized/supported type!"
          )
  
      return new_dtype
  
file_path: io/tensorflow_io/python/experimental/serial_ops.py
imports: import functools
  import os
  import tempfile
  import numpy
  import tensorflow
label_desc: Use image node_id 5 for calling a global function with example usage: base_type(dtype) and returns: new_dtype