code: def improve_code(files, objective, suggest_only=True, **config):
      """(openai<1) Improve the code to achieve a given objective.
  
      Args:
          files (list): A list of file names containing the source code.
          objective (str): The objective to achieve.
          suggest_only (bool): Whether to return only the suggestions or the improved code.
          config (Optional, dict): The configuration for the API call.
  
      Returns:
          str: The improved code if suggest_only=False; a list of suggestions if suggest_only=True (default).
          float: The cost of the generation.
      """
      code = ""
      for file_name in files:
          # read the entire file into a string
          with open(file_name, "r") as f:
              file_string = f.read()
          code += f"""{file_name}:
  {file_string}
  
  """
      params = {**_IMPROVE_CODE_CONFIG, **config}
      followup = (
          "" if suggest_only else " followed by the improved code"
      )
      response = oai.Completion.create(
          {"objective": objective, "code": code, "followup": followup},
          **params,
      )
      return oai.Completion.extract_text(response)[0], response["cost"]
  
imports: import logging
  import os
  import pathlib
  import re
  import string
  import subprocess
  import sys
  import time
  from concurrent.futures import ThreadPoolExecutor, TimeoutError
  from hashlib import md5
  from typing import Callable, Dict, List, Optional, Tuple, Union
  from autogen import oai
label_desc: Use image node_id 6 for calling a global function with example usage: improve_code(files, objective, suggest_only) and returns: oai,  response