code: def _get_system_message(
      messages: List[llama_types.ChatCompletionRequestMessage],
  ) -> str:
      """Get the first system message."""
      for message in messages:
          if message["role"] == "system":
              return message["content"] or ""
      return ""
  
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 3 for calling a global function with example usage: _get_system_message(messages) and returns: str, unknown