code: def test_discrete_getitem_dict(
      space_format: Type[ExecutableModelSpace], nn: ModuleType
  ):
      class Net(ModelSpace, label_prefix="model"):
          def __init__(self):
              super().__init__()
              choices = [{"b": [3], "bp": [6]}, {"b": [6], "bp": [12]}]
              self.conv = MutableConv2d(
                  3, Categorical(choices, label="a")["b"][0], 1
              )
              self.conv1 = MutableConv2d(
                  Categorical(choices, label="a")["bp"][0], 3, 1
              )
  
          def forward(self, x):
              x = self.conv(x)
              return self.conv1(torch.cat((x, x), 1))
  
      model = space_format.from_model(Net())
      assert len(model.simplify()) == 1
      input = torch.randn(1, 3, 5, 5)
      # Sanity check
      model.random().executable_model()(input)
  
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 19 for calling a global function with example usage: test_discrete_getitem_dict(space_format, nn) and returns: self