code: def test_model_space_inherit():
      class ModelSpace1(ModelSpace):
          def __init__(self, a, b=1):
              super().__init__()
              self.d = self.add_mutable(
                  Categorical([4, 5, 6], label="d")
              )
  
      class ModelSpace2(ModelSpace1):
          def __init__(self, c=2):
              super().__init__(c, b=3)
              self.c = self.add_mutable(
                  Categorical([1, 2, 3], label="c")
              )
  
      model = ModelSpace2(5)
      assert model.trace_kwargs == {"c": 5}
      assert model.c.label == "c"
      assert model.d.label == "d"
      assert model.trace_symbol == ModelSpace2
  
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 11 for calling a global function with example usage: test_model_space_inherit() without return types