prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  ASPP type hints need to be updated
  In ASPP (https://github.com/Project-MONAI/MONAI/blob/dev/monai/networks/blocks/aspp.py), the type hints of `acti_type` and `norm_type` are missing.
  
  </issue>
  <code>
  [start of monai/networks/blocks/aspp.py]
  1 # Copyright 2020 - 2021 MONAI Consortium
  2 # Licensed under the Apache License, Version 2.0 (the "License");
  3 # you may not use this file except in compliance with the License.
  4 # You may obtain a copy of the License at
  5 #     http://www.apache.org/licenses/LICENSE-2.0
  6 # Unless required by applicable law or agreed to in writing, software
  7 # distributed under the License is distributed on an "AS IS" BASIS,
  8 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9 # See the License for the specific language governing permissions and
  10 # limitations under the License.
  11 
  12 from typing import Sequence
  13 
  14 import torch
  15 import torch.nn as nn
  16 
  17 from monai.networks.blocks.convolutions import Convolution
  18 from monai.networks.layers import same_padding
  19 from monai.networks.layers.factories import Act, Conv, Norm
  20 
  21 
  22 class SimpleASPP(nn.Module):
  23     """
  24     A simplified version of the atrous spatial pyramid pooling (ASPP) module.
  25 
  26     Chen et al., Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation.
  27     https://arxiv.org/abs/1802.02611
  28 
  29     Wang et al., A Noise-robust Framework for Automatic Segmentation of COVID-19 Pneumonia Lesions
  30     from CT Images. https://ieeexplore.ieee.org/document/9109297
  31     """
  32 
  33     def __init__(
  34         self,
  35         spatial_dims: int,
  36         in_channels: int,
  37         conv_out_channels: int,
  38         kernel_sizes: Sequence[int] = (1, 3, 3, 3),
  39         dilations: Sequence[int] = (1, 2, 4, 6),
  40         norm_type=Norm.BATCH,
  41         acti_type=Act.LEAKYRELU,
  42     ) -> None:
  43         """
  44         Args:
  45             spatial_dims: number of spatial dimensions, could be 1, 2, or 3.
  46             in_channels: number of input channels.
  47             conv_out_channels: number of output channels of each atrous conv.
  48                 The final number of output channels is conv_out_channels * len(kernel_sizes).
  49             kernel_sizes: a sequence of four convolutional kernel sizes.
  50                 Defaults to (1, 3, 3, 3) for four (dilated) convolutions.
  51             dilations: a sequence of four convolutional dilation parameters.
  52                 Defaults to (1, 2, 4, 6) for four (dilated) convolutions.
  53             norm_type: final kernel-size-one convolution normalization type.
  54                 Defaults to batch norm.
  55             acti_type: final kernel-size-one convolution activation type.
  56                 Defaults to leaky ReLU.
  57 
  58         Raises:
  59             ValueError: When ``kernel_sizes`` length differs from ``dilations``.
  60 
  61         See also:
  62 
  63             :py:class:`monai.networks.layers.Act`
  64             :py:class:`monai.networks.layers.Conv`
  65             :py:class:`monai.networks.layers.Norm`
  66 
  67         """
  68         super().__init__()
  69         if len(kernel_sizes) != len(dilations):
  70             raise ValueError(
  71                 "kernel_sizes and dilations length must match, "
  72                 f"got kernel_sizes={len(kernel_sizes)} dilations={len(dilations)}."
  73             )
  74         pads = tuple(same_padding(k, d) for k, d in zip(kernel_sizes, dilations))
  75 
  76         self.convs = nn.ModuleList()
  77         for k, d, p in zip(kernel_sizes, dilations, pads):
  78             _conv = Conv[Conv.CONV, spatial_dims](
  79                 in_channels=in_channels, out_channels=conv_out_channels, kernel_size=k, dilation=d, padding=p
  80             )
  81             self.convs.append(_conv)
  82 
  83         out_channels = conv_out_channels * len(pads)  # final conv. output channels
  84         self.conv_k1 = Convolution(
  85             dimensions=spatial_dims,
  86             in_channels=out_channels,
  87             out_channels=out_channels,
  88             kernel_size=1,
  89             act=acti_type,
  90             norm=norm_type,
  91         )
  92 
  93     def forward(self, x: torch.Tensor) -> torch.Tensor:
  94         """
  95         Args:
  96             x: in shape (batch, channel, spatial_1[, spatial_2, ...]).
  97         """
  98         x_out = torch.cat([conv(x) for conv in self.convs], dim=1)
  99         x_out = self.conv_k1(x_out)
  100         return x_out
  101
  [end of monai/networks/blocks/aspp.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/monai/networks/blocks/aspp.py b/monai/networks/blocks/aspp.py
  --- a/monai/networks/blocks/aspp.py
  +++ b/monai/networks/blocks/aspp.py
  @@ -9,14 +9,14 @@
   # See the License for the specific language governing permissions and
   # limitations under the License.
   
  -from typing import Sequence
  +from typing import Optional, Sequence, Tuple, Union
   
   import torch
   import torch.nn as nn
   
   from monai.networks.blocks.convolutions import Convolution
   from monai.networks.layers import same_padding
  -from monai.networks.layers.factories import Act, Conv, Norm
  +from monai.networks.layers.factories import Conv
   
   
   class SimpleASPP(nn.Module):
  @@ -37,8 +37,8 @@
           conv_out_channels: int,
           kernel_sizes: Sequence[int] = (1, 3, 3, 3),
           dilations: Sequence[int] = (1, 2, 4, 6),
  -        norm_type=Norm.BATCH,
  -        acti_type=Act.LEAKYRELU,
  +        norm_type: Optional[Union[Tuple, str]] = "BATCH",
  +        acti_type: Optional[Union[Tuple, str]] = "LEAKYRELU",
       ) -> None:
           """
           Args:
  
verification_info: {"golden_diff": "diff --git a/monai/networks/blocks/aspp.py b/monai/networks/blocks/aspp.py\n--- a/monai/networks/blocks/aspp.py\n+++ b/monai/networks/blocks/aspp.py\n@@ -9,14 +9,14 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-from typing import Sequence\n+from typing import Optional, Sequence, Tuple, Union\n \n import torch\n import torch.nn as nn\n \n from monai.networks.blocks.convolutions import Convolution\n from monai.networks.layers import same_padding\n-from monai.networks.layers.factories import Act, Conv, Norm\n+from monai.networks.layers.factories import Conv\n \n \n class SimpleASPP(nn.Module):\n@@ -37,8 +37,8 @@\n         conv_out_channels: int,\n         kernel_sizes: Sequence[int] = (1, 3, 3, 3),\n         dilations: Sequence[int] = (1, 2, 4, 6),\n-        norm_type=Norm.BATCH,\n-        acti_type=Act.LEAKYRELU,\n+        norm_type: Optional[Union[Tuple, str]] = \"BATCH\",\n+        acti_type: Optional[Union[Tuple, str]] = \"LEAKYRELU\",\n     ) -> None:\n         \"\"\"\n         Args:\n", "issue": "ASPP type hints need to be updated\nIn ASPP (https://github.com/Project-MONAI/MONAI/blob/dev/monai/networks/blocks/aspp.py), the type hints of `acti_type` and `norm_type` are missing.\n", "before_files": [{"content": "# Copyright 2020 - 2021 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#     http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom typing import Sequence\n\nimport torch\nimport torch.nn as nn\n\nfrom monai.networks.blocks.convolutions import Convolution\nfrom monai.networks.layers import same_padding\nfrom monai.networks.layers.factories import Act, Conv, Norm\n\n\nclass SimpleASPP(nn.Module):\n    \"\"\"\n    A simplified version of the atrous spatial pyramid pooling (ASPP) module.\n\n    Chen et al., Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation.\n    https://arxiv.org/abs/1802.02611\n\n    Wang et al., A Noise-robust Framework for Automatic Segmentation of COVID-19 Pneumonia Lesions\n    from CT Images. https://ieeexplore.ieee.org/document/9109297\n    \"\"\"\n\n    def __init__(\n        self,\n        spatial_dims: int,\n        in_channels: int,\n        conv_out_channels: int,\n        kernel_sizes: Sequence[int] = (1, 3, 3, 3),\n        dilations: Sequence[int] = (1, 2, 4, 6),\n        norm_type=Norm.BATCH,\n        acti_type=Act.LEAKYRELU,\n    ) -> None:\n        \"\"\"\n        Args:\n            spatial_dims: number of spatial dimensions, could be 1, 2, or 3.\n            in_channels: number of input channels.\n            conv_out_channels: number of output channels of each atrous conv.\n                The final number of output channels is conv_out_channels * len(kernel_sizes).\n            kernel_sizes: a sequence of four convolutional kernel sizes.\n                Defaults to (1, 3, 3, 3) for four (dilated) convolutions.\n            dilations: a sequence of four convolutional dilation parameters.\n                Defaults to (1, 2, 4, 6) for four (dilated) convolutions.\n            norm_type: final kernel-size-one convolution normalization type.\n                Defaults to batch norm.\n            acti_type: final kernel-size-one convolution activation type.\n                Defaults to leaky ReLU.\n\n        Raises:\n            ValueError: When ``kernel_sizes`` length differs from ``dilations``.\n\n        See also:\n\n            :py:class:`monai.networks.layers.Act`\n            :py:class:`monai.networks.layers.Conv`\n            :py:class:`monai.networks.layers.Norm`\n\n        \"\"\"\n        super().__init__()\n        if len(kernel_sizes) != len(dilations):\n            raise ValueError(\n                \"kernel_sizes and dilations length must match, \"\n                f\"got kernel_sizes={len(kernel_sizes)} dilations={len(dilations)}.\"\n            )\n        pads = tuple(same_padding(k, d) for k, d in zip(kernel_sizes, dilations))\n\n        self.convs = nn.ModuleList()\n        for k, d, p in zip(kernel_sizes, dilations, pads):\n            _conv = Conv[Conv.CONV, spatial_dims](\n                in_channels=in_channels, out_channels=conv_out_channels, kernel_size=k, dilation=d, padding=p\n            )\n            self.convs.append(_conv)\n\n        out_channels = conv_out_channels * len(pads)  # final conv. output channels\n        self.conv_k1 = Convolution(\n            dimensions=spatial_dims,\n            in_channels=out_channels,\n            out_channels=out_channels,\n            kernel_size=1,\n            act=acti_type,\n            norm=norm_type,\n        )\n\n    def forward(self, x: torch.Tensor) -> torch.Tensor:\n        \"\"\"\n        Args:\n            x: in shape (batch, channel, spatial_1[, spatial_2, ...]).\n        \"\"\"\n        x_out = torch.cat([conv(x) for conv in self.convs], dim=1)\n        x_out = self.conv_k1(x_out)\n        return x_out\n", "path": "monai/networks/blocks/aspp.py"}]}