code: def encoding_for_model(model_name: str) -> Encoding:
      """Returns the encoding used by a model.
  
      Raises a KeyError if the model name is not recognised.
      """
      return get_encoding(encoding_name_for_model(model_name))
  
imports: from __future__ import annotations
  from .core import Encoding
  from .registry import get_encoding
label_desc: Use image node_id 2 for calling a global function with example usage: encoding_for_model(model_name) and returns: get_encoding