code: def _pad_tensor(tensor, field, padding_size):
      """Pads a tensor on the first dimensions with the padding size.
  
      Args:
        tensor: tf.Tensor of size [batch_dim, x1, ..., xn].
        field: Text, the field of `graphs.GraphsTuple` to pad.
        padding_size: A tuple representing the size of padding of the graph.
  
      Returns:
        A tf.Tensor of size [batch_dim + padding, x1, ..., xn] padded with zeros.
      """
      padding = _get_field_size_from_size_tuple(padding_size, field)
      padding_tensor = tf.zeros(
          [padding] + tensor.shape.as_list()[1:],
          dtype=tensor.dtype,
          name="pad_zeros_{}".format(field),
      )
      return tf.concat((tensor, padding_tensor), axis=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 37 for calling a global function with example usage: _pad_tensor(tensor, field, padding_size) and returns: tf