code: def test_layerchoice_nested(predictor):
      net = LayerChoice(
          [
              nn.Sequential(
                  MutableConv2d(32, nni.choice("a", [128, 256]), 1),
                  MutableConv2d(nni.choice("a", [128, 256]), 32, 1),
              ),
              nn.Sequential(
                  MutableConv2d(32, nni.choice("b", [1, 32]), 1),
                  MutableConv2d(nni.choice("b", [1, 32]), 32, 1),
              ),
          ],
          label="y",
      )
      profiler = NnMeterProfiler(
          net, torch.randn(1, 32, 32, 32), predictor
      )
      result = profiler.profile({"y": 0, "a": 128, "b": 1})
      assert (
          0
          < profiler.profile({"y": 0, "a": 128, "b": 1})
          < profiler.profile({"y": 0, "a": 256, "b": 1})
      )
      assert profiler.profile(
          {"y": 1, "a": 128, "b": 1}
      ) == profiler.profile({"y": 1, "a": 256, "b": 1})
      assert profiler.profile(
          {"y": 0, "a": 128, "b": 32}
      ) > profiler.profile({"y": 1, "a": 256, "b": 1})
  
      class CustomProfiler(NnMeterProfiler):
          def estimate_layerchoice_latency(self, *args):
              raise RuntimeError()
  
          def is_leaf_module(self, module: nn.Module) -> bool:
              return super().is_leaf_module(module) or isinstance(
                  module, LayerChoice
              )
  
      profiler = CustomProfiler(
          net, torch.randn(1, 32, 32, 32), predictor
      )
      assert (
          result * 0.95
          < profiler.profile({"y": 0, "a": 128, "b": 1})
          < result * 1.05
      )
  
imports: import pytest
  import torch
  from torch import nn
  import nni
  from nni.mutable import Categorical
  from nni.nas.hub.pytorch import *
  from nni.nas.hub.pytorch.mobilenetv3 import SqueezeExcite
  from nni.nas.hub.pytorch.proxylessnas import ConvBNReLU, DepthwiseSeparableConv, InvertedResidual
  from nni.nas.nn.pytorch import MutableConv2d, MutableLinear, LayerChoice, Repeat
  from nni.nas.profiler.pytorch.nn_meter import NnMeterProfiler, to_onnx, combinations
  from nni.nas.profiler.pytorch.utils import MutableShape
  from nn_meter import load_latency_predictor
  from ut.nas.nn.models import MODELS
label_desc: Use image node_id 6 for calling a global function with example usage: test_layerchoice_nested(predictor) and returns: unknown