code: def _placeholders_from_graphs_tuple(
      graph, force_dynamic_num_graphs=True
  ):
      """Creates a `graphs.GraphsTuple` of placeholders that matches a numpy graph.
  
      Args:
        graph: A `graphs.GraphsTuple` that contains numpy data.
        force_dynamic_num_graphs: A `bool` that forces the batch dimension to be
          dynamic. Defaults to `True`.
  
      Returns:
        A `graphs.GraphsTuple` containing placeholders.
      """
      graph_dtypes = graph.map(
          lambda v: tf.as_dtype(v.dtype) if v is not None else None,
          ALL_FIELDS,
      )
      graph_shapes = graph.map(
          lambda v: list(v.shape) if v is not None else None, ALL_FIELDS
      )
      return _build_placeholders_from_specs(
          graph_dtypes,
          graph_shapes,
          force_dynamic_num_graphs=force_dynamic_num_graphs,
      )
  
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 3 for calling a global function with example usage: _placeholders_from_graphs_tuple(graph, force_dynamic_num_graphs) and returns: _build_placeholders_from_specs