code: def with_dtype(specs, dtype):
      """Updates dtypes of all specs in the input spec.
  
      Args:
        specs: Nested list/tuple/dict of TensorSpecs/ArraySpecs, describing the
          shape of tensors.
        dtype: dtype to update the specs to.
  
      Returns:
        Nested TensorSpecs with the udpated dtype.
      """
  
      def update_dtype(spec):
          if hasattr(spec, "minimum") and hasattr(spec, "maximum"):
              return BoundedTensorSpec(
                  spec.shape,
                  dtype,
                  spec.minimum,
                  spec.maximum,
                  spec.name,
              )
          return TensorSpec(spec.shape, dtype, name=spec.name)
  
      return tf.nest.map_structure(update_dtype, specs)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from typing import Union
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.specs import array_spec
  from tf_agents.typing import types
  from google.protobuf import text_format
  from tensorflow.core.protobuf import struct_pb2
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.saved_model import nested_structure_coder
label_desc: Use image node_id 16 for calling a global function with example usage: with_dtype(specs, dtype) and returns: tf, TensorSpec, BoundedTensorSpec