code: def get_padding(
      kernel_size: int, stride: int = 1, dilation: int = 1, **_
  ) -> int:
      """
      Calculate symmetric padding for a convolution
      Args:
          kernel_size(`Int`):
              Convolution kernel size.
          stride(`Int`):
              Convolution stride parameter.
          dilation(`Int`):
              Convolution dilation parameter.
      Returns:
          (`Int`)
              Padding size to keep.
      """
      padding = ((stride - 1) + dilation * (kernel_size - 1)) // 2
      return padding
  
file_path: towhee/towhee/models/layers/padding_functions.py
imports: import math
  from typing import List, Tuple
  import torch
  from torch import Tensor
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: get_padding(kernel_size, stride, dilation) and returns: padding