code: def test_config_to_json():
      """
      Needs to run from Driverless AI source directory.
      E.g. (base) jon@gpu:~/h2oai$ pytest -s -v /data/jon/h2ogpt/create_data.py::test_config_to_json ; cp config.json /data/jon/h2ogpt/
      :return:
      """
      try:
          # Arrange
          import json
          from h2oaicore.systemutils import config
  
          toml_list = []
          for k, v in config.get_meta_dict().items():
              title = (v.title + ": ") if v.title else ""
              comment = v.comment or ""
              if not (title or comment):
                  continue
              toml_list.extend(
                  [
                      {
                          "prompt_type": "plain",
                          "instruction": f"<human>: What does {k} do?\n<bot>: {k.replace('_', ' ')} config.toml:  {comment or title}\n<human>:".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "plain",
                          "instruction": f"<human>: Explain {k}.\n<bot>: {k.replace('_', ' ')} config.toml:  {comment or title}\n<human>:".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "plain",
                          "instruction": f"<human>: How can I do this: {title}.\n<bot>: Set the {k.replace('_', ' ')} config.toml\n<human>:".replace(
                              "\n", ""
                          ),
                      }
                      if title and comment
                      else None,
                      {
                          "prompt_type": "human_bot",
                          "instruction": f"Explain the following expert setting for Driverless AI",
                          "input": f"{k}",
                          "output": f"{k.replace('_', ' ')} config.toml: {comment or title}".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "human_bot",
                          "instruction": f"Explain the following expert setting for Driverless AI",
                          "input": f"{k}",
                          "output": f"{k.replace('_', ' ')} config.toml: {title}{comment}".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "human_bot",
                          "instruction": f"Explain the following expert setting for Driverless AI",
                          "input": f"{k.replace('_', ' ')}",
                          "output": f"{k.replace('_', ' ')} config.toml: {title}{comment}".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "human_bot",
                          "instruction": f"Explain the following expert setting for Driverless AI",
                          "input": f"{title}",
                          "output": f"{k.replace('_', ' ')} config.toml: {title}{comment}".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "human_bot",
                          "instruction": f"Provide a short explanation of the expert setting {k}",
                          "output": f"{k.replace('_', ' ')} config.toml: {comment or title}".replace(
                              "\n", ""
                          ),
                      },
                      {
                          "prompt_type": "human_bot",
                          "instruction": f"Provide a detailed explanation of the expert setting {k}",
                          "output": f"{k.replace('_', ' ')} config.toml: {title}{comment}".replace(
                              "\n", ""
                          ),
                      },
                  ]
              )
          toml_list = [x for x in toml_list if x]
          with open("config.json", "wt") as f:
              f.write(json.dumps(toml_list, indent=2))
      except Exception as e:
          print("Exception: %s" % str(e), flush=True)
  
imports: import ast
  import concurrent.futures
  import contextlib
  import hashlib
  import json
  import os
  import shutil
  import signal
  import sys
  import traceback
  from concurrent.futures import ProcessPoolExecutor
  import psutil
  import pytest
  import pandas
  import numpy
  from tqdm import tqdm
  from utils import flatten_list, remove
  from joblib import Parallel, delayed, effective_n_jobs
  from sklearn.utils import gen_even_slices
  from sklearn.utils.validation import _num_samples
label_desc: Use image node_id 8 for calling a global function with example usage: test_config_to_json() without return types