class_docstr: A model space is a collection of mutables, organized in a meaningful way (i.e., in a model way).
  
  :class:`BaseModelSpace` is almost only used for isinstance check.
  A few utility functions might be provided inside this class for convenience.
class_docstr_tok: ["A","model","space","is","a","collection","of","mutables",",","organized","in","a","meaningful","way","(","i.e.",",","in","a","model","way",")",".",":","class",":","`","BaseModelSpace","`","is","almost","only","used","for","isinstance","check",".","A","few","utility","functions","might","be","provided","inside","this","class","for","convenience","."]
docstr: Get a factory that creates a frozen model from this model space.
docstr_tok: ["Get","a","factory","that","creates","a","frozen","model","from","this","model","space","."]
code: def frozen_factory(cls, sample: Sample) -> frozen_factory:
      """Get a factory that creates a frozen model from this model space."""
      return frozen_factory(cls, model_context(sample))
  
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 1 for calling the BaseModelSpace obj's underlying member method code with example usage: obj.frozen_factory(cls, sample) and returns: frozen_factory