def METHOD_NAME(project_id, user_id):
    """Project owner removes a collaborator, or collaborator
    removes him/herself."""
    response = jsonify(REQUESTER_FRAUD), 404
    # get project
    project = Project.query.filter(Project.project_id == project_id).one_or_none()
    # check if project is owned by current user or if the user is
    # involved in the project
    if project and (
        (project.owner == current_user) or (project in current_user.involved_in)
    ):
        user = DB.session.get(User, user_id)
        try:
            project.collaborators.remove(user)
            DB.session.commit()
            response = (
                jsonify({"message": "Collaborator removed from project."}),
                200
            )
        except SQLAlchemyError:
            response = (
                jsonify({"message": "Error removing collaborator."}),
                404
            )
    return response