code: def nest_to_numpy(nest_of_tensors):
      """Converts a nest of eager tensors to a nest of numpy arrays.
  
      Leaves non-`tf.Tensor` elements untouched.
  
      A common use case for this method is to transform a `graphs.GraphsTuple` of
      tensors into a `graphs.GraphsTuple` of arrays, or nests containing
      `graphs.GraphsTuple`s.
  
      Args:
        nest_of_tensors: Nest containing `tf.Tensor`s.
  
      Returns:
        A nest with the same structure where `tf.Tensor`s are replaced by numpy
        arrays and all other elements are kept the same.
      """
      return tree.map_structure(
          lambda x: x.numpy() if isinstance(x, tf.Tensor) else x,
          nest_of_tensors,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import functools
  from absl import logging
  from graph_nets import graphs
  from graph_nets import utils_np
  import six
  from six.moves import range
  import tensorflow
  import tree
label_desc: Use image node_id 29 for calling a global function with example usage: nest_to_numpy(nest_of_tensors) and returns: tree