code: def get_num_graphs(input_graphs, name="get_num_graphs"):
      """Returns the number of graphs (i.e. the batch size) in `input_graphs`.
  
      Args:
        input_graphs: A `graphs.GraphsTuple` containing tensors.
        name: (string, optional) A name for the operation.
  
      Returns:
        An `int` (if a static number of graphs is defined) or a `tf.Tensor` (if the
          number of graphs is dynamic).
      """
      with tf.name_scope(name):
          return _get_shape(input_graphs.n_node)[0]
  
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 28 for calling a global function with example usage: get_num_graphs(input_graphs, name) and returns: _get_shape