<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reassign_comment_to_book(self, comment_id, from_book_id, to_book_id):
 """Moves a ``Credit`` from one ``Book`` to another. Mappings to other ``Books`` are unaffected. arg: comment_id (osid.id.Id):
 the ``Id`` of the ``Comment`` arg: from_book_id (osid.id.Id):
 the ``Id`` of the current ``Book`` arg: to_book_id (osid.id.Id):
 the ``Id`` of the destination ``Book`` raise: NotFound - ``comment_id, from_book_id,`` or ``to_book_id`` not found or ``comment`` not mapped to ``from_book_id`` raise: NullArgument - ``comment_id, book_id_id,`` or ``to_book_id`` is ``null`` raise: OperationFailed - unable to complete request raise: PermissionDenied - authorization failure *compliance: mandatory -- This method must be implemented.* """

        # Implemented from template for
        # osid.resource.ResourceBinAssignmentSession.reassign_resource_to_bin
        self.assign_comment_to_book(comment_id, to_book_id)
        try:
            self.unassign_comment_from_book(comment_id, from_book_id)
        except:  # something went wrong, roll back assignment to to_book_id
            self.unassign_comment_from_book(comment_id, to_book_id)
            raise