def METHOD_NAME(self, benefactor: User) -> dict:
    shift_swap = self.get_object()
    prev_state = shift_swap.insight_logs_serialized
    try:
        shift_swap.take(benefactor)
    except exceptions.ShiftSwapRequestNotOpenForTaking:
        raise BadRequest(detail="The shift swap request is not in a state which allows it to be taken")
    except exceptions.BeneficiaryCannotTakeOwnShiftSwapRequest:
        raise BadRequest(detail="A shift swap request cannot be created and taken by the same user")
    write_resource_insight_log(
        instance=shift_swap,
        author=self.request.user,
        event=EntityEvent.UPDATED,
        prev_state=prev_state,
        new_state=shift_swap.insight_logs_serialized,
    )
    return ShiftSwapRequestSerializer(shift_swap).data