class_docstr: PyTorch module, but with uncertainties.
  
  This base class provides useful tools to handle search spaces built on top of PyTorch modules,
  including methods like :meth:`simplify`, :meth:`freeze`.
  
  :class:`MutableModule` can have dangling mutables registered on it via :meth:`add_mutable`.
class_docstr_tok: ["PyTorch","module",",","but","with","uncertainties",".","This","base","class","provides","useful","tools","to","handle","search","spaces","built","on","top","of","PyTorch","modules",",","including","methods","like",":","meth",":","`","simplify","`",",",":","meth",":","`","freeze","`",".",":","class",":","`","MutableModule","`","can","have","dangling","mutables","registered","on","it","via",":","meth",":","`","add_mutable","`","."]
docstr: Traverse the module subtree, find all descendants that are :class:`MutableModule`.
  
  - If a child module is :class:`MutableModule`, return it directly, and its subtree will be ignored.
  - If not, it will be recursively expanded, until :class:`MutableModule` is found.
code: def named_mutable_descendants(
      self,
  ) -> Iterable[Tuple[str, "MutableModule"]]:
      """Traverse the module subtree, find all descendants that are :class:`MutableModule`.
  
      - If a child module is :class:`MutableModule`, return it directly, and its subtree will be ignored.
      - If not, it will be recursively expanded, until :class:`MutableModule` is found.
      """
  
      def _iter(
          name: str, module: nn.Module
      ) -> Iterable[Tuple[str, MutableModule]]:
          for subname, child in module.named_children():
              name_ = name + "." + subname if name else subname
              if isinstance(child, MutableModule):
                  yield name_, child
              else:
                  yield from _iter(name_, child)
  
      yield from _iter("", self)
  
imports: import copy
  import itertools
  import inspect
  import logging
  from typing import Any, Callable, Type, Iterable, Dict, Tuple, List, Optional, TypeVar
  import torch
  from torch import nn
  from nni.mutable import Mutable, LabeledMutable, Sample, SampleValidationError, ensure_frozen, frozen_context, label_scope, frozen
  from nni.nas.space import BaseModelSpace, current_model, model_context
  from nni.common.serializer import SerializableObject, _formulate_arguments, _copy_class_wrapper_attributes
label_desc: Use image node_id 9 for calling the MutableModule obj's underlying member method code with example usage: obj.named_mutable_descendants() without return types