def format_v1_score_response(response, limit_to_model=None):
    """
    The response format looks like this::

        {
            "<rev_id>": {
                "<model_name>": <score>
                "<model_name>": <score>
            },
            "<rev_id>": {
                "<model_name>": <score>
                "<model_name>": <score>
            }
        }
    """
    response_doc = defaultdict(dict)
    for rev_id, rev_scores in response.scores.items():
        for model_name, score in rev_scores.items():
            response_doc[rev_id][model_name] = score

    for rev_id, rev_errors in response.errors.items():
        for model_name, error in rev_errors.items():
            response_doc[rev_id][model_name] = util.format_error(error)

    if limit_to_model is not None:
        return util.jsonify({rev_id: model_scores[limit_to_model]
                            for rev_id, model_scores in response_doc.items()})
    else:
        return util.jsonify(response_doc)
The response format looks like this::

        {
            "<rev_id>": {
                "<model_name>": <score>
                "<model_name>": <score>
            },
            "<rev_id>": {
                "<model_name>": <score>
                "<model_name>": <score>
            }
        }