import json


def index_by_page_id(s):
  """Pair a dict with a page_id key, pair the page_id with the dict.

  Args:
    s: a dict as a JSON document.

  Returns:
    a tuple of page_id, and parsed Python dict.
  """
  d = json.loads(s)
  return (d['page_id'], d)