code: def format_messages(messages, *format_args, **format_kwargs):
      # Format the content of all the messages
      return [
          {
              "role": message["role"],
              "content": message["content"].format(
                  *format_args, **format_kwargs
              ),
          }
          for message in messages
      ]
  
file_path: evals/evals/elsuite/ballots/utils.py
imports: from typing import Optional
  import tiktoken
  from evals.elsuite.ballots.prompts import control_chat_prompt, control_text_template, manipulation_chat_template, manipulation_text_template, text_prompt, voter_chat_prompt, voter_text_prompt
  from evals.registry import is_chat_model
label_desc: Use image node_id 2 for calling a global function with example usage: format_messages(messages) and returns: unknown