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: The classmethod is to create a brand new module with fixed architecture.
  
  The parameter ``sample`` is a dict with the exactly same format as ``sample`` in :meth:`freeze`.
  The difference is that when :meth:`create_fixed_module` is called,
  there is no :class:`MutableModule` instance created yet.
  Thus it can be useful to simplify the creation of a fixed module,
  by saving the cost of creating a :class:`MutableModule` instance and immediately :meth:`freeze` it.
  
  If automatic label generation (e.g., :func:`~nni.mutable.auto_label`) is used in ``__init__``,
  the same number of labels should be generated in this method.
  Otherwise it will mess up the global label counter, and potentially affect the label of successive modules.
  
  By default, this method has a not-implemented flag, and :meth:`should_invoke_fixed_module` will return ``False``
  based on this flag.
code: def create_fixed_module(cls, sample: dict, *args, **kwargs) -> nn.Module:  # type: ignore
      """
      The classmethod is to create a brand new module with fixed architecture.
  
      The parameter ``sample`` is a dict with the exactly same format as ``sample`` in :meth:`freeze`.
      The difference is that when :meth:`create_fixed_module` is called,
      there is no :class:`MutableModule` instance created yet.
      Thus it can be useful to simplify the creation of a fixed module,
      by saving the cost of creating a :class:`MutableModule` instance and immediately :meth:`freeze` it.
  
      If automatic label generation (e.g., :func:`~nni.mutable.auto_label`) is used in ``__init__``,
      the same number of labels should be generated in this method.
      Otherwise it will mess up the global label counter, and potentially affect the label of successive modules.
  
      By default, this method has a not-implemented flag, and :meth:`should_invoke_fixed_module` will return ``False``
      based on this flag.
      """
      raise NotImplementedError(
          "create_fixed_module() must be implemented when `custom_fixed_module_creation` is set to true."
      )
  
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 5 for calling the MutableModule obj's underlying member method code with example usage: obj.create_fixed_module(cls, sample) without return types