code: def _cast_call(f, new_dtype, args, kwargs):
      """Runs the function with all tensor/variable arguments casted."""
      # TODO(loreno): Implement more granular casting, not all Tensors/Variables
      args = _maybe_cast_structure(args, new_dtype)
      kwargs = _maybe_cast_structure(kwargs, new_dtype)
  
      # TODO(loreno): Remove float32 hardcode and replace with original dtype
      with custom_getter.custom_variable_getter(
          lambda x: _maybe_cast_structure(x, new_dtype)
      ):
          ret = f(*args, **kwargs)
      return _maybe_cast_structure(ret, tf.float32)
  
file_path: sonnet/sonnet/src/mixed_precision.py
imports: import uuid
  import contextlib
  from sonnet.src import custom_getter
  from sonnet.src import utils
  import tensorflow
  import tree
label_desc: Use image node_id 6 for calling a global function with example usage: _cast_call(f, new_dtype, args, kwargs) and returns: _maybe_cast_structure