code: def plmodel(**kwvars):
      """
      Decorator for a Custom PyTorch model that registers its arguments as hyperparameters.
  
      Used for custom pytorch model subclassing from pytorch_lightning.LightningModule.
      Each hyperparameter may take a fixed value or be a searchable space
      (e.g. hpo.space.Int, hpo.space.Categorical).
  
      :return: a PlAutoMdl object. The instantiation of the class object is delayed
               until PlAutoMdl.sample() is called (usually in each trial). Unlike TFAutoMdl,
               PlAutoMdl, does not have search and search_summary methods.
      >>>
      """
  
      def registered_class(Cls):
          objCls = obj(**kwvars)(Cls)
  
          class PLAutoMdl(Cls):
              def __init__(self, **kwargs):
                  self.kwargs = kwargs
                  self._lazyobj = objCls(**kwargs)
                  # generate a default config for the super class
                  default_config = (
                      self._lazyobj.cs.get_default_configuration().get_dictionary()
                  )
                  super_kwargs = copy.deepcopy(self.kwargs)
                  kwspaces = copy.deepcopy(self._lazyobj.kwspaces)
                  for k, v in super_kwargs.items():
                      if k in kwspaces and isinstance(
                          kwspaces[k], NestedSpace
                      ):
                          sub_config = _strip_config_space(
                              default_config, prefix=k
                          )
                          super_kwargs[k] = kwspaces[k].sample(
                              **sub_config
                          )
                      elif k in default_config:
                          super_kwargs[k] = default_config[k]
                  super().__init__(**super_kwargs)
                  self.backend = create_hpo_backend()
  
              def __repr__(self):
                  return "PlAutoMdl -- " + Cls.__name__
  
              def _model_build(self, trial):
                  # override _model_build to build
                  # the model directly instead of using
                  # modeld_init and model_compile
                  model = self.backend.instantiate(trial, self._lazyobj)
                  # self._model_compile(model, trial)
                  return model
  
          return PLAutoMdl
  
      return registered_class
  
imports: import copy
  import logging
  import argparse
  import functools
  from collections import OrderedDict
  import numpy
  import multiprocessing
  from .space import *
  from .space import _add_hp, _add_cs, _rm_hp, _strip_config_space, SPLITTER
  from .callgraph import CallCache
  from bigdl.nano.automl.utils import EasyDict
  from bigdl.nano.automl.utils import proxy_methods
  from bigdl.nano.automl.hpo.backend import create_hpo_backend
  from bigdl.nano.deps.automl.hpo_api import create_configuration_space
label_desc: Use image node_id 6 for calling a global function with example usage: plmodel() and returns: registered_class, PLAutoMdl, unknown, model