docs: def assert_200(response, max_len=500):
    """ Check that a HTTP response returned 200. """
    if response.status_code == 200:
      return
  
    raise ValueError(
        "Response was {}, not 200:\n{}\n{}".format(
            response.status_code,
            json.dumps(dict(response.headers), indent=2),
            response.content[:max_len]))