import requests


def get_quizzes(course_id, headers):
    """This function returns a list of JSONs
    that include all of the quizzes for a given course
    The main purpose for this function is to find the
    peer mentorship review quizzes we give the students
    but this would return useful data about any quizzes
    we were interested in.
    USAGE:
    This function requires that you have an API predefined.
    Most users won't notice this in the front end as we'll
    build the key into the program. If you're servicing in the
    future headers should look like:
    headers = {"Authorization":f"Bearer {api_key}"}
    jsons = get_quizes(400, headers)
    """
    r = requests.get(f"https://lambdaschool.instructure.com/api/v1/courses/{course_id}/quizzes", headers=headers)
    raw = r.json()
    for i in raw:
        i["course_id"] = course_id
    return raw