code: def format_snoozy(
      messages: List[llama_types.ChatCompletionRequestMessage],
      **kwargs: Any,
  ) -> ChatFormatterResponse:
      system_template = "### Instruction:\n{system_message}"
      default_system_message = "The prompt below is a question to answer, a task to complete, or a conversation to respond to; decide which and write an appropriate response."
      _system_message = _get_system_message(messages)
      _system_message = (
          _system_message
          if _system_message != ""
          else default_system_message
      )
      system_message = system_template.format(
          system_message=_system_message
      )
      _roles = dict(user="### Prompt", assistant="### Response")
      _sep = "\n"
      _stop = "###"
      system_message = _system_message
      _messages = _map_roles(messages, _roles)
      _messages.append((_roles["assistant"], None))
      _prompt = _format_add_colon_single(
          system_message, _messages, _sep
      )
      return ChatFormatterResponse(prompt=_prompt, stop=_stop)
  
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 27 for calling a global function with example usage: format_snoozy(messages) and returns: ChatFormatterResponse