code: def format_alpaca(
      messages: List[llama_types.ChatCompletionRequestMessage],
      **kwargs: Any,
  ) -> ChatFormatterResponse:
      _roles = dict(user="### Instruction", assistant="### Response")
      _sep = "\n\n"
      _sep2 = "</s>"
      system_message = _get_system_message(messages)
      _messages = _map_roles(messages, _roles)
      _prompt = _format_add_colon_two(
          system_message, _messages, _sep, _sep2
      )
      return ChatFormatterResponse(prompt=_prompt)
  
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 19 for calling a global function with example usage: format_alpaca(messages) and returns: ChatFormatterResponse