@flush_transaction
    def edit_member(self, requester, user_or_group, reason, **kwargs):
        now = datetime.utcnow()
        member_type = user_or_group.member_type

        # Force role to member when member is a group. Just in case.
        if member_type == 1 and "role" in kwargs:
            kwargs["role"] = "member"

        logging.debug(
            "Editing member (%s) in %s", user_or_group.name, self.groupname
        )

        edge = GroupEdge.get(
            self.session,
            group_id=self.id,
            member_type=member_type,
            member_pk=user_or_group.id,
        )
        self.session.flush()

        if not edge:
            raise MemberNotFound()

        request = Request(
            requester_id=requester.id,
            requesting_id=self.id,
            on_behalf_obj_type=member_type,
            on_behalf_obj_pk=user_or_group.id,
            requested_at=now,
            edge_id=edge.id,
            status="actioned",
            changes=build_changes(
                edge, **kwargs
            ),
        ).add(self.session)
        self.session.flush()

        request_status_change = RequestStatusChange(
            request=request,
            user_id=requester.id,
            to_status="actioned",
            change_at=now,
        ).add(self.session)
        self.session.flush()

        Comment(
            obj_type=OBJ_TYPES_IDX.index("RequestStatusChange"),
            obj_pk=request_status_change.id,
            user_id=requester.id,
            comment=reason,
            created_on=now,
        ).add(self.session)

        edge.apply_changes(request)
        self.session.flush()

        message = "Edit member {} {}: {}".format(
            OBJ_TYPES_IDX[member_type].lower(), user_or_group.name, reason)
        AuditLog.log(self.session, requester.id, 'edit_member',
                     message, on_group_id=self.id)

        Counter.incr(self.session, "updates")
Testing the GET review-requests/<id>/screenshots/ API
dataset/ETHPy150Open dropbox/grouper/grouper/model_soup.py/Group.edit_member--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/webapi/tests/test_screenshot.py/ResourceListTests.test_get_with_invalid_review_request_id