def get_shared_memories_and_context(
    model: language_model.LanguageModel,
) -> tuple[Sequence[str], str]:
  """Return the shared memories and context for all agents and game master."""
  shared_memories = [GENERAL_BACKGROUND, '\n'.join(SCENARIO_PREMISE)]

  # The shared context will be used for the NPC context. It reflects general
  # knowledge and is possessed by all characters.
  shared_context = model.sample_text(
      'Summarize the following passage in the craziest way possible. Really '
      'turn it up to 11. Most important is to maintain its madcap style:\n'
      + '\n'.join(shared_memories)
      + '\n'
      + 'Summary:'
  )
  return shared_memories, shared_context
Return the shared memories and context for all agents and game master.
examples/deprecated/modular/environment/forbidden_fruit.py