code: def _concatenate_data_dicts(data_dicts):
      """Concatenate a list of data dicts to create the equivalent batched graph.
  
      Args:
        data_dicts: An iterable of data dictionaries with keys a subset of
          `GRAPH_DATA_FIELDS`, plus, potentially, a subset of `GRAPH_NUMBER_FIELDS`.
          Every element of `data_dicts` has to contain the same set of keys.
          Moreover, the key `NODES` or `N_NODE` must be present in every element of
          `data_dicts`.
  
      Returns:
        A data dictionary with the keys `GRAPH_DATA_FIELDS + GRAPH_NUMBER_FIELDS`,
        representing the concatenated graphs.
  
      Raises:
        ValueError: If two dictionaries in `data_dicts` have a different set of
          keys.
      """
      # Go from a list of dict to a dict of lists
      dct = collections.defaultdict(lambda: [])
      for data_dict in data_dicts:
          data_dict = _populate_number_fields(data_dict)
          for k, v in data_dict.items():
              if v is not None:
                  dct[k].append(v)
              elif k not in dct:
                  dct[k] = None
      dct = dict(dct)
  
      # Concatenate the graphs.
      for field, tensors in dct.items():
          if tensors is None:
              dct[field] = None
          elif field in list(GRAPH_NUMBER_FIELDS) + [GLOBALS]:
              dct[field] = tf.stack(tensors)
          else:
              dct[field] = tf.concat(tensors, axis=0)
  
      # Add offsets to the receiver and sender indices.
      if dct[RECEIVERS] is not None:
          offset = _compute_stacked_offsets(dct[N_NODE], dct[N_EDGE])
          dct[RECEIVERS] += offset
          dct[SENDERS] += offset
  
      return dct
  
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 16 for calling a global function with example usage: _concatenate_data_dicts(data_dicts) and returns: dct