def _get_first_padding_graph(graphs_batch, padding_size,
                             experimental_unconnected_padding_edges):
  """Gets a dummy graph that pads receivers and senders.

  This dummy graph will have number of nodes = padding_size.nodes and
  number of edges = padding_size.edges. Receivers and
  senders will be indexed with all zeros (connecting to the first node in the
  dummy graph).

  Args:
    graphs_batch: the `graphs.GraphsTuple` to be padded.
    padding_size: a `GraphsTupleSize` with the padding size.
    experimental_unconnected_padding_edges: see `pad_graphs_tuple` for details.

  Returns:
    A `graphs.GraphsTuple` of a single dummy graph.
  """

  # Set the edges to belong to an index corresponding to a node that does not
  # exist.
  if experimental_unconnected_padding_edges:
    logging.log_first_n(
        logging.WARNING,
        "Using a padding graph with unconnected edges. This is an experimental "
        "feature which may stop working in the future, and will lead to out"
        "of range errors on tf.scatter if the graph net computation occurs on "
        "CPU.", 1)
    dummy_senders_and_receivers = (
        tf.ones([padding_size.num_edges], tf.int32) * padding_size.num_nodes)
  else:
    dummy_senders_and_receivers = tf.zeros([padding_size.num_edges], tf.int32)

  return graphs.GraphsTuple(
      n_node=[padding_size.num_nodes],
      n_edge=[padding_size.num_edges],
      nodes=tree.map_structure(
          functools.partial(
              _get_zeros_with_variable_batch_size,
              padding_size=padding_size.num_nodes), graphs_batch.nodes),
      edges=tree.map_structure(
          functools.partial(
              _get_zeros_with_variable_batch_size,
              padding_size=padding_size.num_edges), graphs_batch.edges),
      senders=dummy_senders_and_receivers,
      receivers=dummy_senders_and_receivers,
      globals=tree.map_structure(
          functools.partial(
              _get_zeros_with_variable_batch_size, padding_size=1),
          graphs_batch.globals))
Gets a dummy graph that pads receivers and senders.

  This dummy graph will have number of nodes = padding_size.nodes and
  number of edges = padding_size.edges. Receivers and
  senders will be indexed with all zeros (connecting to the first node in the
  dummy graph).

  Args:
    graphs_batch: the `graphs.GraphsTuple` to be padded.
    padding_size: a `GraphsTupleSize` with the padding size.
    experimental_unconnected_padding_edges: see `pad_graphs_tuple` for details.

  Returns:
    A `graphs.GraphsTuple` of a single dummy graph.
  
graph_nets/utils_tf.py