code: def _compute_paddings(height_pad_amt, width_pad_amt, patch_axes):
      """Convert the total pad amounts to the format needed by tf.pad()."""
  
      top_pad = height_pad_amt // 2
      bottom_pad = height_pad_amt - top_pad
      left_pad = width_pad_amt // 2
      right_pad = width_pad_amt - left_pad
  
      paddings = [[0, 0] for _ in range(4)]
      paddings[patch_axes[0]] = [top_pad, bottom_pad]
      paddings[patch_axes[1]] = [left_pad, right_pad]
  
      return paddings
  
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 1 for calling a global function with example usage: _compute_paddings(height_pad_amt, width_pad_amt, patch_axes) and returns: paddings