code: def test_discrete_multi(
      space_format: Type[ExecutableModelSpace], nn: ModuleType
  ):
      class Net(ModelSpace, label_prefix="model"):
          def __init__(self):
              super().__init__()
              choice1 = Categorical(
                  [
                      {"in": 1, "out": 3},
                      {"in": 2, "out": 6},
                      {"in": 3, "out": 9},
                  ]
              )
              choice2 = Categorical([2.5, 3.0, 3.5], label="multi")
              choice3 = Categorical([2.5, 3.0, 3.5], label="multi")
              self.conv1 = MutableConv2d(
                  choice1["in"], round(choice1["out"] * choice2), 1
              )
              self.conv2 = MutableConv2d(
                  choice1["in"], round(choice1["out"] * choice3), 1
              )
  
          def forward(self, x):
              return self.conv1(x) + self.conv2(x)
  
      model = space_format.from_model(Net())
      assert len(model.simplify()) == 2
  
      for i, selected_model in enumerate(model.grid()):
          input = torch.randn(1, i // 3 + 1, 3, 3)
          expected_shape = torch.Size(
              [
                  1,
                  round((i // 3 + 1) * 3 * [2.5, 3.0, 3.5][i % 3]),
                  3,
                  3,
              ]
          )
          assert (
              selected_model.executable_model()(input).shape
              == expected_shape
          )
  
imports: import copy
  import random
  from types import ModuleType
  from typing import Type
  import pytest
  import nni
  import nni.nas.nn.pytorch.layers
  import nni.nas.evaluator.pytorch.lightning
  import torch
  import torch.nn.functional
  from nni.mutable import Categorical, ensure_frozen, label_scope, SampleValidationError
  from nni.nas.evaluator import FunctionalEvaluator
  from nni.nas.space import RawFormatModelSpace, SimplifiedModelSpace, ExecutableModelSpace, GraphModelSpace, model_context
  from nni.nas.space.pytorch import PytorchGraphModelSpace
  from nni.nas.nn.pytorch import ParametrizedModule, MutableModule, ModelSpace, LayerChoice, InputChoice, Cell, ChosenInputs, MutableConv2d, MutableLinear
label_desc: Use image node_id 20 for calling a global function with example usage: test_discrete_multi(space_format, nn) and returns: unknown