code: def test_discrete_getitem(
      space_format: Type[ExecutableModelSpace], nn: ModuleType
  ):
      class Net(ModelSpace, label_prefix=None):
          def __init__(self):
              super().__init__()
              vc = Categorical([(6, 3), (8, 5)], label="vc")
              self.conv = MutableConv2d(3, vc[0], kernel_size=vc[1])
  
          def forward(self, x):
              return self.conv(x)
  
      model = space_format.from_model(Net())
      assert len(model.simplify()) == 1
      model1 = model.freeze({"vc": (6, 3)}).executable_model()
      model2 = model.freeze({"vc": (8, 5)}).executable_model()
      input = torch.randn(1, 3, 5, 5)
      assert model1(input).size() == torch.Size([1, 6, 3, 3])
      assert model2(input).size() == torch.Size([1, 8, 1, 1])
  
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 18 for calling a global function with example usage: test_discrete_getitem(space_format, nn) and returns: self