code: def identity(graph, name="graph_identity"):
      """Pass each element of a graph through a `tf.identity`.
  
      This allows, for instance, to push a name scope on the graph by writing:
      ```
      with tf.name_scope("encoder"):
        graph = utils_tf.identity(graph)
      ```
  
      Args:
        graph: A `graphs.GraphsTuple` containing `Tensor`s. `None` values are passed
          through.
        name: (string, optional) A name for the operation.
  
      Returns:
        A `graphs.GraphsTuple` `graphs_output` such that for any field `x` in NODES,
        EDGES, GLOBALS, RECEIVERS, SENDERS, N_NODE, N_EDGE, if `graph.x` was
        `None`, `graph_output.x` is `None`, and otherwise
        `graph_output.x = tf.identity(graph.x)`
      """
      non_none_fields = [
          k for k in ALL_FIELDS if getattr(graph, k) is not None
      ]
      with tf.name_scope(name):
          return graph.map(tf.identity, non_none_fields)
  
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 11 for calling a global function with example usage: identity(graph, name) and returns: graph