code: def block_until_ready(tensors):
      """Blocks computation until it is ready.
  
      Args:
        tensors: A nest of Tensors.
  
      Returns:
        tensors: Tensors that are are guaranteed to be ready to materialize.
      """
  
      def _block_until_ready(tensor):
          if hasattr(tensor, "block_until_ready"):
              return tensor.block_until_ready()
          else:
              return tensor
  
      return map_tree(_block_until_ready, tensors)
  
imports: import functools
  import jax
  from jax import lax
  from jax import random
  from jax import tree_util
  import jax.numpy
label_desc: Use image node_id 18 for calling a global function with example usage: block_until_ready(tensors) and returns: map_tree, tensor, tensor