code: def _maybe_cast_structure(x, dtype: tf.DType):
      return tree.map_structure(
          lambda x: _maybe_cast_element(x, dtype), x
      )
  
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 5 for calling a global function with example usage: _maybe_cast_structure(x, dtype) and returns: tree