code: def _validate_dtype(dtype):
      """Check that dtype is supported by tf.decode_raw."""
      dtype = tf.as_dtype(dtype)
      supported_dtypes = (
          tf.half,
          tf.float32,
          tf.float64,
          tf.uint8,
          tf.int8,
          tf.uint16,
          tf.int16,
          tf.int32,
          tf.int64,
      )
      if dtype not in supported_dtypes:
          raise ValueError(
              "%s is not supported, dtype must be one of %s"
              % (
                  dtype.name,
                  ", ".join(d.name for d in supported_dtypes),
              )
          )
      return dtype
  
file_path: agents/tf_agents/utils/example_encoding.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from collections import abc
  import io
  import gin
  import numpy
  from PIL import Image
  import tensorflow
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 5 for calling a global function with example usage: _validate_dtype(dtype) and returns: dtype