def METHOD_NAME(
    self, request: Request, member_id: int, token: str, organization_slug: Optional[str] = None
) -> Response:
    invite_context = get_invite_state(
        member_id=int(member_id),
        organization_slug=organization_slug,
        user_id=request.user.id,
    )
    if invite_context is None:
        return self.respond_invalid()
    helper = self.get_helper(request, token, invite_context)
    if helper.member_already_exists:
        response = Response(
            status=status.HTTP_400_BAD_REQUEST, data={"details": "member already exists"}
        )
    elif not helper.valid_request:
        return Response(
            status=status.HTTP_400_BAD_REQUEST,
            data={"details": "unable to accept organization invite"},
        )
    else:
        response = Response(status=status.HTTP_204_NO_CONTENT)
    helper.accept_invite()
    remove_invite_details_from_session(request)
    return response