def METHOD_NAME(d: DocInfo, user: User) -> list[PeerReview]:
    q = PeerReview.query.filter_by(block_id=d.id).filter(
        (PeerReview.reviewable_id == user.id) | (PeerReview.reviewer_id == user.id)
    )
    return q.all()