code: def get_padding_value(
      padding: str, kernel_size: int, **kwargs
  ) -> Tuple[int, bool]:
      """
      Args:
          padding(`Str`):
              Padding type, 'same' or 'valid'.
          kernel_size(`Int`):
              Convolution kernel size.
      Returns:
          (`Int`): padding shape.
          (`Bool`): dynamically padding.
      """
      dynamic = False
      if isinstance(padding, str):
          # for any string padding, the padding will be calculated for you, one of three ways
          padding = padding.lower()
          if padding == "same":
              # TF compatible 'SAME' padding, has a performance and GPU memory allocation impact
              if is_static_pad(kernel_size, **kwargs):
                  # static case, no extra overhead
                  padding = get_padding(kernel_size, **kwargs)
              else:
                  # dynamic 'SAME' padding, has runtime/GPU memory overhead
                  padding = 0
                  dynamic = True
          elif padding == "valid":
              # 'VALID' padding, same as padding=0
              padding = 0
          else:
              # Default to PyTorch style 'same'-ish symmetric padding
              padding = get_padding(kernel_size, **kwargs)
      return padding, dynamic
  
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 5 for calling a global function with example usage: get_padding_value(padding, kernel_size) and returns: padding,  dynamic