code: def _get_pad_shape(
      auto_pad: str,
      input_spatial_shape: Tuple[int],
      kernel_spatial_shape: Tuple[int],
      strides_spatial: Tuple[int],
      output_spatial_shape: Tuple[int],
  ) -> Tuple[int]:
      pad_shape = [0] * len(input_spatial_shape)
      if auto_pad in ("SAME_UPPER", "SAME_LOWER"):
          for i in range(len(input_spatial_shape)):
              pad_shape[i] = (
                  (output_spatial_shape[i] - 1) * strides_spatial[i]
                  + kernel_spatial_shape[i]
                  - input_spatial_shape[i]
              )
      elif auto_pad == "VALID":
          pass
      if len(pad_shape) == 0:
          raise RuntimeError(
              f"Unable to compute pad shape, auto_pad={auto_pad!r}, "
              f"input_spatial_shape={input_spatial_shape!r}, "
              f"kernel_spatial_shape={kernel_spatial_shape!r}, "
              f"strides_spatial={strides_spatial!r}."
          )
      return tuple(pad_shape)
  
file_path: onnx/onnx/reference/ops/_op_common_pool.py
imports: import itertools
  from typing import Optional, Tuple
  import numpy
  from onnx.reference.op_run import OpRun
  from onnx.reference.ops._op_common_indices import _get_index, _get_indices
label_desc: Use image node_id 1 for calling a global function with example usage: _get_pad_shape(auto_pad, input_spatial_shape, kernel_spatial_shape, strides_spatial, output_spatial_shape) and returns: tuple