def _lookup_reviews(uid, peer_reviews):
    """Given a user id (uid), finds number of assigned and completed peer reviews
       for that given student in the peer_reviews table. Returns dictionary with
       'Assigned' and 'Completed' counts.

    Args:
        uid (int): User id to search for
        peer_reviews (DataFrame): Peer reviews table

    Returns:
        Dictionary with two keys, 'Assigned' and 'Completed' with
        number of assigned/completed peer reviews as values

    """
    assigned_subset = peer_reviews[peer_reviews["assessor_id"] == uid]
    completed_subset = assigned_subset[assigned_subset["workflow_state"] == "completed"]

    assigned = len(assigned_subset)
    completed = len(completed_subset)

    return {"Assigned": assigned, "Completed": completed}