def decode_content(
    content: Optional[dict[str, Any]],
) -> Optional[types.Content]:
  """Decodes a content object from a JSON dictionary."""
  if not content:
    return None
  return types.Content.model_validate(content)
Decodes a content object from a JSON dictionary.
src/google/adk/sessions/_session_util.py