class_docstr: Model space that is simplified (see :meth:`~nni.mutable.Mutable.simplify`),
  and only keeps the key information.
  
  With :class:`SimplifiedModelSpace`, all details inside the model will be removed,
  which means, the weights, attributes, inplace modifications of the model will all be lost.
  Only the simplified mutables and necessary init arguments to recover the model for execution will be kept.
  
  The :meth:`freeze` method does nothing but remembers the sample.
  When the model is actually executed for real (i.e., when :meth;`executable_model` is called),
  the model will be recreated from scratch, and the sample will be applied to the model.
  To be specific, it will create the model with traced symbols and arguments,
  but under a :meth:`~nni.nas.space.model_context`.
  The context can be detected via :meth:`~nni.nas.space.current_model`.
  It's the responsibility of the model space to check whether the context is available,
  and create a frozen model directly if it is (note that ``freeze`` and ``contains`` method of model space is never used).
  :class:`~nni.nas.nn.pytorch.MutableModule` is an example which has already implemented this logic.
class_docstr_tok: ["Model","space","that","is","simplified","(","see",":","meth",":","`","~nni.mutable.Mutable.simplify","`",")",",","and","only","keeps","the","key","information",".","With",":","class",":","`","SimplifiedModelSpace","`",",","all","details","inside","the","model","will","be","removed",",","which","means",",","the","weights",",","attributes",",","inplace","modifications","of","the","model","will","all","be","lost",".","Only","the","simplified","mutables","and","necessary","init","arguments","to","recover","the","model","for","execution","will","be","kept",".","The",":","meth",":","`","freeze","`","method","does","nothing","but","remembers","the","sample",".","When","the","model","is","actually","executed","for","real","(","i.e.",",","when",":","meth",";","`","executable_model","`","is","called",")",",","the","model","will","be","recreated","from","scratch",",","and","the","sample","will","be","applied","to","the","model",".","To","be","specific",",","it","will","create","the","model","with","traced","symbols","and","arguments",",","but","under","a",":","meth",":","`","~nni.nas.space.model_context","`",".","The","context","can","be","detected","via",":","meth",":","`","~nni.nas.space.current_model","`",".","It","'s","the","responsibility","of","the","model","space","to","check","whether","the","context","is","available",",","and","create","a","frozen","model","directly","if","it","is","(","note","that","``","freeze","``","and","``","contains","``","method","of","model","space","is","never","used",")",".",":","class",":","`","~nni.nas.nn.pytorch.MutableModule","`","is","an","example","which","has","already","implemented","this","logic","."]
code: def leaf_mutables(
      self, is_leaf: Callable[[Mutable], bool]
  ) -> Iterable[LabeledMutable]:
      yield from self.mutables.leaf_mutables(is_leaf)
      if isinstance(self.evaluator, Mutable):
          yield from self.evaluator.leaf_mutables(is_leaf)
  
imports: from __future__ import annotations
  import weakref
  from copy import deepcopy
  from enum import Enum
  from typing import NoReturn, Any, Callable, Iterable
  from nni.common.serializer import is_traceable, SerializableObject
  from nni.nas.evaluator import Evaluator
  from nni.mutable import Mutable, Sample, MutableDict, LabeledMutable, SampleValidationError, frozen_factory
  from nni.typehint import TrialMetric
  from .frozen import model_context
  from .metrics import Metrics
label_desc: Use image node_id 5 for calling the SimplifiedModelSpace obj's underlying member method code with example usage: obj.leaf_mutables(is_leaf) without return types