code: def get_same_padding(in_shape, kernel, dilation, stride):
      """
      Provides CMSIS-NN padding when output dim == input dim.
      This is TFLu's "SAME" padding case.
      """
      dilated_kernel_h = dilation[0] * (kernel[0] - 1) + 1
      out = int(math.ceil(float(in_shape[0]) / float(stride[0])))
      pad = max(
          0, (out - 1) * stride[0] + dilated_kernel_h - in_shape[0]
      )
      pad_top = pad // 2
      pad_bottom = pad - pad_top
  
      dilated_kernel_w = dilation[1] * (kernel[1] - 1) + 1
      out = int(math.ceil(float(in_shape[1]) / float(stride[1])))
      pad = max(
          0, (out - 1) * stride[1] + dilated_kernel_w - in_shape[1]
      )
      pad_left = pad // 2
      pad_right = pad - pad_left
      return [pad_top, pad_left, pad_bottom, pad_right]
  
imports: import math
  from typing import List, Union, Tuple
  import numpy
  import tvm
  from tvm import relay
  from tvm.testing.aot import AOTTestRunner, get_dtype_range
label_desc: Use image node_id 6 for calling a global function with example usage: get_same_padding(in_shape, kernel, dilation, stride) and returns: list