code: def config_list_from_models(
      key_file_path: Optional[str] = ".",
      openai_api_key_file: Optional[str] = "key_openai.txt",
      aoai_api_key_file: Optional[str] = "key_aoai.txt",
      aoai_api_base_file: Optional[str] = "base_aoai.txt",
      exclude: Optional[str] = None,
      model_list: Optional[list] = None,
  ) -> List[Dict]:
      """
      Get a list of configs for API calls with models specified in the model list.
  
      This function extends `config_list_openai_aoai` by allowing to clone its' out for each of the models provided.
      Each configuration will have a 'model' key with the model name as its value. This is particularly useful when
      all endpoints have same set of models.
  
      Args:
          key_file_path (str, optional): The path to the key files.
          openai_api_key_file (str, optional): The file name of the OpenAI API key.
          aoai_api_key_file (str, optional): The file name of the Azure OpenAI API key.
          aoai_api_base_file (str, optional): The file name of the Azure OpenAI API base.
          exclude (str, optional): The API type to exclude, "openai" or "aoai".
          model_list (list, optional): The list of model names to include in the configs.
  
      Returns:
          list: A list of configs for OpenAI API calls, each including model information.
  
      Example:
      ```
          # Define the path where the API key files are located
          key_file_path = '/path/to/key/files'
  
          # Define the file names for the OpenAI and Azure OpenAI API keys and bases
          openai_api_key_file = 'key_openai.txt'
          aoai_api_key_file = 'key_aoai.txt'
          aoai_api_base_file = 'base_aoai.txt'
  
          # Define the list of models for which to create configurations
          model_list = ['gpt-4', 'gpt-3.5-turbo']
  
          # Call the function to get a list of configuration dictionaries
          config_list = config_list_from_models(
              key_file_path=key_file_path,
              openai_api_key_file=openai_api_key_file,
              aoai_api_key_file=aoai_api_key_file,
              aoai_api_base_file=aoai_api_base_file,
              model_list=model_list
          )
  
          # The `config_list` will contain configurations for the specified models, for example:
          # [
          #     {'api_key': '...', 'base_url': 'https://api.openai.com', 'model': 'gpt-4'},
          #     {'api_key': '...', 'base_url': 'https://api.openai.com', 'model': 'gpt-3.5-turbo'}
          # ]
      ```
      """
      config_list = config_list_openai_aoai(
          key_file_path=key_file_path,
          openai_api_key_file=openai_api_key_file,
          aoai_api_key_file=aoai_api_key_file,
          aoai_api_base_file=aoai_api_base_file,
          exclude=exclude,
      )
      if model_list:
          config_list = [
              {**config, "model": model}
              for model in model_list
              for config in config_list
          ]
      return config_list
  
file_path: autogen/autogen/oai/openai_utils.py
imports: import json
  import logging
  import os
  import tempfile
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Set, Union
  from dotenv import find_dotenv, load_dotenv
label_desc: Use image node_id 4 for calling a global function with example usage: config_list_from_models(key_file_path, openai_api_key_file, aoai_api_key_file, aoai_api_base_file, exclude, model_list) and returns: config_list