<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_comments_by_books(self, book_ids):
 """Gets the list of ``Comments`` corresponding to a list of ``Books``. arg: book_ids (osid.id.IdList):
 list of book ``Ids`` return: (osid.commenting.CommentList) - list of comments raise: NullArgument - ``book_ids`` 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.ResourceBinSession.get_resources_by_bins
        comment_list = []
        for book_id in book_ids:
            comment_list += list(
                self.get_comments_by_book(book_id))
        return objects.CommentList(comment_list)