code: def _check_window_specs(
      search_window_1d: Tuple[int, int] = (1, 9),
      search_dilate_1d: Tuple[int, int] = (1, 1),
      search_window_2d: Tuple[int, int] = (3, 3),
      search_dilate_2d: Tuple[int, int] = (1, 1),
  ) -> None:
      if not np.prod(search_window_1d) == np.prod(search_window_2d):
          raise ValueError(
              f"The 1D and 2D windows should contain the same number of elements. "
              f"1D shape: {search_window_1d} 2D shape: {search_window_2d}"
          )
      if not np.prod(search_window_1d) % 2 == 1:
          raise ValueError(
              f"Search windows should contain an odd number of elements in them."
              f"Window of shape {search_window_1d} has {np.prod(search_window_1d)} elements."
          )
      if not any(size == 1 for size in search_window_1d):
          raise ValueError(
              f"The 1D search window should have at least one size equal to 1. 1D shape: {search_window_1d}"
          )
      if any(size == 1 for size in search_window_2d):
          raise ValueError(
              f"The 2D search window should have all dimensions greater than 1. 2D shape: {search_window_2d}"
          )
      if any(dilate < 1 for dilate in search_dilate_1d):
          raise ValueError(
              f"The 1D search dilation should have all elements equal or greater than 1. 1D shape: {search_dilate_1d}"
          )
      if any(dilate < 1 for dilate in search_dilate_2d):
          raise ValueError(
              f"The 2D search dilation should have all elements equal greater than 1. 2D shape: {search_dilate_2d}"
          )
  
imports: import math
  from functools import partial
  from typing import Callable, Dict, Iterable, List, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import torchvision.models.optical_flow.raft
  from torch import Tensor
  from torchvision.models._api import register_model, Weights, WeightsEnum
  from torchvision.models._utils import handle_legacy_interface
  from torchvision.models.optical_flow._utils import grid_sample, make_coords_grid, upsample_flow
  from torchvision.ops import Conv2dNormActivation
  from torchvision.prototype.transforms._presets import StereoMatching
label_desc: Use image node_id 2 for calling a global function with example usage: _check_window_specs(search_window_1d, search_dilate_1d, search_window_2d, search_dilate_2d) without return types