code: def get_sweep_cmd_lines(sweep_config_dict):
      def flatten_options(key, value_list):
          flat_list = []
          for v in value_list:
              if not type(v) is bool:
                  flat_list.append(f"--{key} {v}")
              elif v:
                  flat_list.append(f"--{key}")
              else:
                  flat_list.append(" ")
  
          return flat_list
  
      flat_list = [
          flatten_options(key, value)
          for key, value in sweep_config_dict.items()
      ]
      cmd_list = list(itertools.product(*flat_list))
      cmd_list = [list(cmd) for cmd in cmd_list]
      # dump_cmd_lines(cmd_list)
      return cmd_list
  
imports: import os
  import sys
  import argparse
  import json
  import itertools
  import subprocess
  import shutil
  from test_ds_aio_utils import refine_integer_value
  from perf_sweep_utils import READ_OP_DESC, WRITE_OP_DESC, BENCH_LOG_DIR, READ_IO_DIR, WRITE_IO_DIR, READ_LOG_DIR, WRITE_LOG_DIR
  from deepspeed.ops.op_builder import AsyncIOBuilder
label_desc: Use image node_id 4 for calling a global function with example usage: get_sweep_cmd_lines(sweep_config_dict) and returns: cmd_list, flat_list