code: def window_padding_type_to_pad_values(
      padding_type, lhs_dims, rhs_dims, window_strides
  ):
      """Maps PaddingType or string to pad values (list of pairs of ints)."""
      if not isinstance(padding_type, (str, PaddingType)):
          msg = "padding_type must be str or PaddingType, got {}."
          raise TypeError(msg.format(type(padding_type)))
  
      if isinstance(padding_type, str):
          if padding_type.upper() == "VALID":
              padding_type = PaddingType.VALID
          elif padding_type.upper() == "SAME":
              padding_type = PaddingType.SAME
          else:
              msg = 'Unknown padding type string: expected "VALID" or "SAME", got {}.'
              raise ValueError(msg.format(padding_type))
  
      if padding_type == PaddingType.VALID:
          return [(0, 0)] * len(window_strides)
      elif padding_type == PaddingType.SAME:
          out_shape = np.ceil(
              np.true_divide(lhs_dims, window_strides)
          ).astype(int)
          pad_sizes = [
              max((out_size - 1) * stride + filter_size - in_size, 0)
              for out_size, stride, filter_size, in_size in zip(
                  out_shape, window_strides, rhs_dims, lhs_dims
              )
          ]
          return [
              (pad_size // 2, pad_size - pad_size // 2)
              for pad_size in pad_sizes
          ]
      else:
          msg = "Unexpected PaddingType value: {}"
          raise ValueError(msg.format(padding_type))
  
imports: from __future__ import annotations
  import atexit
  import contextlib
  import enum
  import gzip
  import inspect
  import logging
  import os
  import threading
  from typing import Any, List, Mapping, Optional, Sequence, Tuple, Union
  import ml_dtypes
  import numpy
  from .None import xla_extension
label_desc: Use image node_id 17 for calling a global function with example usage: window_padding_type_to_pad_values(padding_type, lhs_dims, rhs_dims, window_strides) and returns: unknown, unknown