code: def test_label_hierarchy():
      from nni.nas.nn.pytorch import LayerChoice
  
      class ModelInner(nn.Module):
          def __init__(self):
              super().__init__()
              self.net1 = LayerChoice(
                  [nn.Linear(10, 10), nn.Linear(10, 10, bias=False)]
              )
              self.net2 = LayerChoice(
                  [nn.Linear(10, 10), nn.Linear(10, 10, bias=False)]
              )
  
          def forward(self, x):
              x = self.net1(x)
              x = self.net2(x)
              return x
  
      class ModelNested(ModelSpace, label_prefix="model"):
          def __init__(self):
              super().__init__()
              self.fc1 = ModelInner()
              self.fc2 = LayerChoice(
                  [nn.Linear(10, 10), nn.Linear(10, 10, bias=False)]
              )
              self.fc3 = ModelInner()
  
          def forward(self, x):
              return self.fc3(self.fc2(self.fc1(x)))
  
      model = ModelNested()
      assert model.fc1.net1.label == "model/1"
      assert model.fc1.net2.label == "model/2"
      assert model.fc2.label == "model/3"
      assert model.fc3.net1.label == "model/4"
      assert model.fc3.net2.label == "model/5"
  
imports: import copy
  import pytest
  import torch
  import nni
  from torch import nn
  from nni.common.serializer import is_traceable
  from nni.mutable import Categorical, ExpressionConstraint, ensure_frozen, frozen_context, label_scope, auto_label, SampleMissingError
  from nni.mutable.mutable import _mutable_equal
  from nni.nas.nn.pytorch import ModelSpace, MutableModule, ParametrizedModule
  from nni.nas.space import model_context
label_desc: Use image node_id 17 for calling a global function with example usage: test_label_hierarchy() and returns: x, self