code: def test_layerchoice(self):
      class ConvNet(ModelSpace):
          def __init__(self):
              super().__init__()
              self.conv = LayerChoice(
                  [
                      nn.Conv2d(3, 1, 3),
                      nn.Conv2d(3, 1, 5, padding=1),
                  ]
              )
              self.pool = nn.MaxPool2d(kernel_size=2)
  
          def forward(self, x):
              return self.pool(self.conv(x))
  
      net = ConvNet()
      input = torch.randn((1, 3, 224, 224))
      model_ir = self._convert_model(net, input)
  
      # check shape info of each candidates
      conv_nodes = model_ir.get_nodes_by_type(
          "__torch__.torch.nn.modules.conv.Conv2d"
      )
      self.assertEqual(
          conv_nodes[0].operation.attributes.get("output_shape"),
          [[1, 1, 222, 222]],
      )
      self.assertEqual(
          conv_nodes[1].operation.attributes.get("output_shape"),
          [[1, 1, 222, 222]],
      )
  
file_path: nni/test/algo/nas/graph_converter/test_convert_shape.py
imports: import unittest
  import torch
  import nni.nas.nn.pytorch.layers
  from nni.nas.nn.pytorch import LayerChoice, ModelSpace
  from .convert_mixin import ConvertWithShapeMixin
label_desc: Use image node_id 3 for calling the TestShape obj's underlying member method code with example usage: obj.test_layerchoice() and returns: self