code: def config_to_space(config):
      """Convert config to ag.space"""
      space = ag.Dict()
      for k, v in config.items():
          if isinstance(v, dict):
              if k not in space:
                  space[k] = ag.Dict()
              space[k] = config_to_space(v)
          else:
              space[k] = v
      return space
  
imports: import copy
  import warnings
  import numpy
  import autogluon.core
  from ..estimators.base_estimator import BaseEstimator
  from ..estimators import SSDEstimator, FasterRCNNEstimator, YOLOv3Estimator, CenterNetEstimator
  from ..estimators import ImageClassificationEstimator
  from ..data.dataset import ObjectDetectionDataset
label_desc: Use image node_id 6 for calling a global function with example usage: config_to_space(config) and returns: space