code: def __init__(
      self, node_id, num_prev_nodes, channels, num_downsample_connect
  ):
      super().__init__()
      self.ops = nn.ModuleList()
      choice_keys = []
      for i in range(num_prev_nodes):
          stride = 2 if i < num_downsample_connect else 1
          choice_keys.append("{}_p{}".format(node_id, i))
          self.ops.append(
              LayerChoice(
                  OrderedDict(
                      [
                          (
                              "maxpool",
                              ops.PoolBN(
                                  "max",
                                  channels,
                                  3,
                                  stride,
                                  1,
                                  affine=False,
                              ),
                          ),
                          (
                              "avgpool",
                              ops.PoolBN(
                                  "avg",
                                  channels,
                                  3,
                                  stride,
                                  1,
                                  affine=False,
                              ),
                          ),
                          (
                              "skipconnect",
                              nn.Identity()
                              if stride == 1
                              else ops.FactorizedReduce(
                                  channels, channels, affine=False
                              ),
                          ),
                          (
                              "sepconv3x3",
                              ops.SepConv(
                                  channels,
                                  channels,
                                  3,
                                  stride,
                                  1,
                                  affine=False,
                              ),
                          ),
                          (
                              "sepconv5x5",
                              ops.SepConv(
                                  channels,
                                  channels,
                                  5,
                                  stride,
                                  2,
                                  affine=False,
                              ),
                          ),
                          (
                              "dilconv3x3",
                              ops.DilConv(
                                  channels,
                                  channels,
                                  3,
                                  stride,
                                  2,
                                  2,
                                  affine=False,
                              ),
                          ),
                          (
                              "dilconv5x5",
                              ops.DilConv(
                                  channels,
                                  channels,
                                  5,
                                  stride,
                                  4,
                                  2,
                                  affine=False,
                              ),
                          ),
                      ]
                  ),
                  label=choice_keys[-1],
              )
          )
      self.drop_path = ops.DropPath()
      self.input_switch = InputChoice(
          n_candidates=len(choice_keys),
          n_chosen=2,
          label="{}_switch".format(node_id),
      )
  
imports: from collections import OrderedDict
  import torch
  import torch.nn
  import ops
  from nni.retiarii.nn.pytorch import LayerChoice, InputChoice
label_desc: Use image node_id 1 to create a new Node object from inherited base classes: nn with example: obj = Node(node_id, num_prev_nodes, channels, num_downsample_connect)