code: def _common_reduce_window_shape_rule(
      operand,
      window_dimensions,
      window_strides,
      padding,
      base_dilation,
      window_dilation,
  ):
      lax._check_shapelike(
          "reduce_window",
          "window_dimensions",
          window_dimensions,
          non_zero_shape=True,
      )
      lax._check_shapelike(
          "reduce_window",
          "window_strides",
          window_strides,
          non_zero_shape=True,
      )
      lax._check_shapelike(
          "reduce_window", "base_dilation", base_dilation
      )
      lax._check_shapelike(
          "reduce_window", "window_dilation", window_dilation
      )
      if operand.ndim != len(window_dimensions):
          msg = (
              "reduce_window got the wrong number of window_dimensions for "
              "operand: got operand shape {} with window_dimensions {}."
          )
          raise TypeError(msg.format(operand.shape, window_dimensions))
      if len(window_strides) != len(window_dimensions):
          msg = (
              "reduce_window got inconsistent window_strides and "
              "window_dimensions: got window_strides {} and window_dimensions {}."
          )
          raise TypeError(msg.format(window_strides, window_dimensions))
      if len(base_dilation) != len(window_dimensions):
          msg = (
              "reduce_window got inconsistent base_dilation and "
              "window_dimensions: got base_dilation {} and window_dimensions {}."
          )
          raise TypeError(msg.format(base_dilation, window_dimensions))
      if len(window_dilation) != len(window_dimensions):
          msg = (
              "reduce_window got inconsistent window_dilation and "
              "window_dimensions: got window_dilation {} and window_dimensions "
              "{}."
          )
          raise TypeError(
              msg.format(window_dilation, window_dimensions)
          )
  
      return reduce_window_shape_tuple(
          operand.shape,
          window_dimensions,
          window_strides,
          padding,
          base_dilation,
          window_dilation,
      )
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  from typing import Callable
  import warnings
  import numpy
  from jax import tree_util
  from jax._src import ad_util
  from jax._src import core
  from jax._src import dispatch
  from jax._src import dtypes
  from jax._src import util
  from jax._src.core import ShapedArray, ConcreteArray
  from jax._src.interpreters import ad
  from jax._src.interpreters import batching
  from jax._src.interpreters import mlir
  from jax._src.lax import lax
  from jax._src.lax import convolution
  from jax._src.lax import slicing
  from jax._src.lib.mlir import ir
  from jax._src.lib.mlir.dialects import hlo
  from jax._src.numpy.ufuncs import logaddexp
  from jax._src.typing import Array
label_desc: Use image node_id 18 for calling a global function with example usage: _common_reduce_window_shape_rule(operand, window_dimensions, window_strides, padding, base_dilation, window_dilation) and returns: reduce_window_shape_tuple