code: def parameter_to_dict(name, value):
      if name == ".":
          # Parameter name ".", means top-level config
          return value
  
      parameter_dict = {}
      curr_dict = parameter_dict
      name_list = name.split(".")
      for i, name_elem in enumerate(name_list):
          if i == len(name_list) - 1:
              curr_dict[name_elem] = value
          else:
              name_dict = curr_dict.get(name_elem, {})
              curr_dict[name_elem] = name_dict
              curr_dict = name_dict
      return parameter_dict
  
imports: import copy
  import dataclasses
  import json
  import logging
  import os
  import warnings
  from typing import Any, Dict
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.constants import AUTO, COMBINED, EXECUTOR, GOAL, GRID_SEARCH, HYPEROPT, INPUT_FEATURES, LOSS, MAX_CONCURRENT_TRIALS, METRIC, MINIMIZE, NAME, NUM_SAMPLES, OUTPUT_FEATURES, PARAMETERS, PREPROCESSING, RAY, SPACE, SPLIT, TYPE, VALIDATION
  from ludwig.globals import HYPEROPT_STATISTICS_FILE_NAME
  from ludwig.hyperopt.results import HyperoptResults, TrialResults
  from ludwig.types import HyperoptConfigDict, ModelConfigDict
  from ludwig.utils.data_utils import save_json
  from ludwig.utils.misc_utils import get_class_attributes, get_from_registry, merge_dict, set_default_value, set_default_values
  from ludwig.utils.print_utils import print_boxed
label_desc: Use image node_id 6 for calling a global function with example usage: parameter_to_dict(name, value) and returns: parameter_dict, value