code: def pad_compute(tensor: te.Tensor, padding: tuple) -> te.Tensor:
      """Pad an NHWC tensor in the height and width axes.
  
      Parameters
      ----------
      tensor : te.Tensor
          The tensor to pad.
      padding : tuple
          The 4 dimensional padding as (pad_top, pad_left, pad_bottom, pad_right).
  
      Returns
      -------
      te.Tensor
          The padded tensor.
  
      """
      pad_top, pad_left, pad_down, pad_right = padding
      pad_before = [0, int(pad_top), int(pad_left), 0]
      pad_after = [0, int(pad_down), int(pad_right), 0]
      pad_attrs = {
          "op": "ethosu_pad",
      }
      shape = tensor.shape
      return te.compute(
          (
              shape[0],
              shape[1] + pad_top + pad_down,
              shape[2] + pad_left + pad_right,
              shape[3],
          ),
          lambda nn, hh, ww, cc: _pad_tensor(
              tensor, pad_before, pad_after
          )(nn, hh, ww, cc),
          name="ethosu_pad",
          attrs=pad_attrs,
      )
  
file_path: tvm/python/tvm/relay/backend/contrib/ethosu/te/dma.py
imports: from typing import Callable, Tuple, Optional, List
  import tvm
  from tvm import te
  from tvm.topi.utils import equal_const_int
label_desc: Use image node_id 6 for calling a global function with example usage: pad_compute(tensor, padding) and returns: te