code: def get_padding(output_size, input_size, factor):
      TH = (
          output_size[2] - ((input_size[2] - 1) * factor) - (factor * 2)
      )
      TW = (
          output_size[3] - ((input_size[3] - 1) * factor) - (factor * 2)
      )
      padding_H = int(np.ceil(TH / (-2)))
      out_padding_H = TH - padding_H * (-2)
  
      padding_W = int(np.ceil(TW / (-2)))
      out_padding_W = TW - padding_W * (-2)
      return (padding_H, padding_W), (out_padding_H, out_padding_W)
  
imports: import numpy
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: get_padding(output_size, input_size, factor) and returns: padding_H,  padding_W,  out_padding_H,  out_padding_W