def extract_text(memory: MemoryEntry, splitter: str = ' ') -> str:
  """Extracts the text from the memory entry."""
  if not memory.content.parts:
    return ''
  return splitter.join(
      [part.text for part in memory.content.parts if part.text]
  )
Extracts the text from the memory entry.
src/google/adk/tools/_memory_entry_utils.py