code: def __init__(
      self,
      num_channels: int,
      num_modules: int,
      num_blocks: int,
      num_filters: int,
      has_se: bool = False,
      multi_scale_output: bool = True,
      name: str = None,
      align_corners: bool = False,
  ):
      super(Stage, self).__init__()
  
      self._num_modules = num_modules
  
      self.stage_func_list = []
      for i in range(num_modules):
          if i == num_modules - 1 and not multi_scale_output:
              stage_func = self.add_sublayer(
                  "stage_{}_{}".format(name, i + 1),
                  HighResolutionModule(
                      num_channels=num_channels,
                      num_blocks=num_blocks,
                      num_filters=num_filters,
                      has_se=has_se,
                      multi_scale_output=False,
                      name=name + "_" + str(i + 1),
                      align_corners=align_corners,
                  ),
              )
          else:
              stage_func = self.add_sublayer(
                  "stage_{}_{}".format(name, i + 1),
                  HighResolutionModule(
                      num_channels=num_channels,
                      num_blocks=num_blocks,
                      num_filters=num_filters,
                      has_se=has_se,
                      name=name + "_" + str(i + 1),
                      align_corners=align_corners,
                  ),
              )
  
          self.stage_func_list.append(stage_func)
  
imports: import math
  from typing import List
  import paddle
  import paddle.nn
  import paddle.nn.functional
  import fcn_hrnetw48_cityscapes.layers
label_desc: Use image node_id 1 to create a new Stage object from inherited base classes: nn with example: obj = Stage(num_channels, num_modules, num_blocks, num_filters, has_se, multi_scale_output, name, align_corners)