class_docstr: Downsample with both maxpooling and avgpooling,
  double the channel size by concatenating the downsampled feature maps.
docstr: Args:
      spatial_dims: number of spatial dimensions of the input image.
      kernel_size: the kernel size of both pooling operations.
      stride: the stride of the window. Default value is `kernel_size`.
      padding: implicit zero padding to be added to both pooling operations.
      ceil_mode: when True, will use ceil instead of floor to compute the output shape.
docstr_tok: ["Args",":","spatial_dims",":","number","of","spatial","dimensions","of","the","input","image",".","kernel_size",":","the","kernel","size","of","both","pooling","operations",".","stride",":","the","stride","of","the","window",".","Default","value","is","`","kernel_size","`",".","padding",":","implicit","zero","padding","to","be","added","to","both","pooling","operations",".","ceil_mode",":","when","True",",","will","use","ceil","instead","of","floor","to","compute","the","output","shape","."]
code: def __init__(
      self,
      spatial_dims: int,
      kernel_size: Sequence[int] | int,
      stride: Sequence[int] | int | None = None,
      padding: Sequence[int] | int = 0,
      ceil_mode: bool = False,
  ) -> None:
      """
      Args:
          spatial_dims: number of spatial dimensions of the input image.
          kernel_size: the kernel size of both pooling operations.
          stride: the stride of the window. Default value is `kernel_size`.
          padding: implicit zero padding to be added to both pooling operations.
          ceil_mode: when True, will use ceil instead of floor to compute the output shape.
      """
      super().__init__()
      _params = {
          "kernel_size": ensure_tuple_rep(kernel_size, spatial_dims),
          "stride": None
          if stride is None
          else ensure_tuple_rep(stride, spatial_dims),
          "padding": ensure_tuple_rep(padding, spatial_dims),
          "ceil_mode": ceil_mode,
      }
      self.max_pool = Pool[Pool.MAX, spatial_dims](**_params)
      self.avg_pool = Pool[Pool.AVG, spatial_dims](**_params)
  
file_path: MONAI/monai/networks/blocks/downsample.py
imports: from __future__ import annotations
  from collections.abc import Sequence
  import torch
  import torch.nn
  from monai.networks.layers.factories import Pool
  from monai.utils import ensure_tuple_rep
label_desc: Use image node_id 1 to create a new MaxAvgPool object from inherited base classes: nn with example: obj = MaxAvgPool(spatial_dims, kernel_size, stride, padding, ceil_mode)