code: def format_saiga(
      messages: list[llama_types.ChatCompletionRequestMessage],
      **kwargs,
  ) -> ChatFormatterResponse:
      _message_template = "<s>{role}\n{content}</s>"
      _roles = dict(user="user", bot="bot", system="system")
      _messages = _map_roles(messages, _roles)
  
      _prompt = ""
      for role, content in _messages:
          if content:
              _prompt += _message_template.format(
                  role=role, content=content
              )
          else:
              _prompt += f"<s>{role}\n"
      # Response template
      _prompt += "<s>bot"
      return ChatFormatterResponse(prompt=_prompt.strip())
  
imports: from __future__ import annotations
  import os
  import json
  import ctypes
  import dataclasses
  from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, Protocol
  import llama_cpp.llama
  import llama_cpp.llama_types
  import llama_cpp.llama_grammar
  from ._utils import suppress_stdout_stderr
label_desc: Use image node_id 37 for calling a global function with example usage: format_saiga(messages) and returns: ChatFormatterResponse