code: def test_ensure_frozen_consistency(label_prefix):
      class Submodule(MutableModule):
          def __init__(self):
              super().__init__()
              discrete2 = Categorical([1, 2, 3], default=3, label="a")
              self.add_mutable(discrete2)
              self.b = ensure_frozen(discrete2)
  
          def forward(self, x):
              return self.conv(x)
  
      class Net(ModelSpace):
          def __init__(self):
              super().__init__()
              discrete1 = Categorical([1, 2, 3], default=2, label="a")
              self.add_mutable(discrete1)
              self.a = ensure_frozen(discrete1)
              self.sub = Submodule()
  
      with pytest.raises(ValueError, match="default value of"):
          Net()
  
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 8 for calling a global function with example usage: test_ensure_frozen_consistency(label_prefix) and returns: self