def METHOD_NAME(request: ResearcherRequest, study: Study) -> Researcher:
    """ Finds researcher based on the secret key provided.
    Returns 403 if researcher doesn't exist, is not credentialed on the study, or if the secret key
    does not match. """
    researcher = api_get_and_validate_researcher(request)
    # case site admins have access to everything.
    if researcher.site_admin:
        log(f"researcher is site_admin")
        return researcher
    # if the researcher has no relation to the study, 403.
    # case: researcher is not credentialed for this study.
    query = StudyRelation.objects.filter(study_id=study.pk, researcher=researcher)
    if not query.exists():
        log(f"study relation found: {list(query.values())}")
        log("no study access")
        return abort(403)
    return researcher