code: def get_chat_format(name: str):
      try:
          return _CHAT_FORMATS[name]
      except KeyError:
          raise ValueError(
              f"Invalid chat format: {name} (valid formats: {list(_CHAT_FORMATS.keys())})"
          )
  
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 16 for calling a global function with example usage: get_chat_format(name) and returns: _CHAT_FORMATS