code: def infer_pad3d(data, data_pad, layout):
      """Infer the padding from stages in reverse.
  
      Parameters
      ----------
      data : Tensor
          data stage.
  
      data_pad : Tensor
          pad stage.
  
      Returns
      -------
      dpad : int
          padding depth
      hpad : int
          padding height
      wpad : int
          padding width
      """
      if data_pad is None:
          return 0, 0, 0
  
      if layout == "NDHWC":
          _, ID, IH, IW, _ = data.shape
          _, TD, TH, TW, _ = data_pad.shape
      elif layout == "NCDHW":
          _, _, ID, IH, IW = data.shape
          _, _, TD, TH, TW = data_pad.shape
      else:
          raise ValueError(f"Layout {layout} is not supported")
      dpad = TD - ID
      hpad = TH - IH
      wpad = TW - IW
      return (
          get_const_int(dpad),
          get_const_int(hpad),
          get_const_int(wpad),
      )
  
file_path: tvm/python/tvm/topi/nn/utils.py
imports: from __future__ import absolute_import
  import tvm
  from ..utils import get_const_int
label_desc: Use image node_id 2 for calling a global function with example usage: infer_pad3d(data, data_pad, layout) and returns: get_const_int,  get_const_int,  get_const_int, int,  int,  int