code: def get_feed_dict(placeholders, graph):
      """Feeds a `graphs.GraphsTuple` of numpy arrays or `None` into `placeholders`.
  
      When feeding a fully defined graph (no `None` field) into a session, this
      method is not necessary as one can directly do:
  
      ```
      _ = sess.run(_, {placeholders: graph})
      ```
  
      However, if the placeholders contain `None`, the above construction would
      fail. This method allows to replace the above call by
  
      ```
      _ = sess.run(_, get_feed_dict(placeholders: graph))
      ```
  
      restoring the correct behavior.
  
      Args:
        placeholders: A `graphs.GraphsTuple` containing placeholders.
        graph: A `graphs.GraphsTuple` containing placeholder compatibale values,
          or `None`s.
  
      Returns:
        A dictionary with key placeholders and values the fed in values.
  
      Raises:
        ValueError: If the `None` fields in placeholders and `graph` do not exactly
          match.
      """
      feed_dict = {}
      for field in ALL_FIELDS:
          placeholder = getattr(placeholders, field)
          feed_value = getattr(graph, field)
          if placeholder is None or feed_value is None:
              if not (placeholder is None and feed_value is None):
                  raise ValueError(
                      "Field {} should be `None` in either none or both of "
                      "the placeholders and feed values.".format(field)
                  )
          else:
              feed_dict[placeholder] = feed_value
      return feed_dict
  
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 4 for calling a global function with example usage: get_feed_dict(placeholders, graph) and returns: feed_dict