def check_if_in_team(api, team_id, person):
    """ Checks if a person is in a given team

    :param api: CiscoSparkAPI instance to query Spark with.

    :param team_id: The ID of the team to check for

    :param person: The person to check against the team
    """
    team_memberships = api.team_memberships.list(team_id)

    # Check every membership to see if this person is contained within
    for membership in team_memberships:
        if person.id == membership.personId:
            return True

    return False