code: def args(default=None, **kwvars):
      """
      Decorator for a Python script that registers its arguments as hyperparameters.
  
      Each hyperparameter may take a fixed value or be a searchable space
      (e.g. hpo.space.Int, hpo.space.Categorical).
  
      :param default: a dictionary of hyperparameter default values, defaults to None
      :return : a wrapped function.
      """
      if default is None:
          default = dict()
      kwvars["_default_config"] = default
  
      def registered_func(func):
          @_automl_method
          @functools.wraps(func)
          def wrapper_call(*args, **kwargs):
              return func(*args, **kwargs)
  
          default = kwvars["_default_config"]
          wrapper_call.register_args(default=default, **kwvars)
          return wrapper_call
  
      return registered_func
  
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 2 for calling a global function with example usage: args(default) and returns: registered_func, wrapper_call, func