code: def _pad_to_match(tensor_list, patch_axes):
      """Pads outputs of CNN examples until the patch sizes are equal."""
  
      tensor_heights = [
          tensor.shape[patch_axes[0]] for tensor in tensor_list
      ]
      new_height = max(tensor_heights)
      height_pad_amts = [
          new_height - tensor_height for tensor_height in tensor_heights
      ]
  
      tensor_widths = [
          tensor.shape[patch_axes[1]] for tensor in tensor_list
      ]
      new_width = max(tensor_widths)
      width_pad_amts = [
          new_width - tensor_width for tensor_width in tensor_widths
      ]
  
      padded_tensor_list = []
      for tensor, height_pad_amt, width_pad_amt in zip(
          tensor_list, height_pad_amts, width_pad_amts
      ):
          paddings = _compute_paddings(
              height_pad_amt, width_pad_amt, patch_axes
          )
          padded_tensor = tf.pad(tensor, paddings)
          padded_tensor_list.append(padded_tensor)
  
      return padded_tensor_list
  
imports: import abc
  import collections
  import enum
  import time
  from absl import logging
  from model_search import block_builder
  from model_search import utils
  from model_search.architecture import architecture_utils
  from model_search.proto import phoenix_spec_pb2
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling a global function with example usage: _pad_to_match(tensor_list, patch_axes) and returns: padded_tensor_list