def display_candidates(self, candidates, pdf_file=None):
        """
        Displays the bounding boxes corresponding to candidates on an image of the pdf
        boxes is a list of 5-tuples (page, top, left, bottom, right)
        """
        if not pdf_file:
            pdf_file = os.path.join(
                self.pdf_path, candidates[0][0].context.sentence.document.name
            )
            if os.path.isfile(pdf_file + ".pdf"):
                pdf_file += ".pdf"
            elif os.path.isfile(pdf_file + ".PDF"):
                pdf_file += ".PDF"
            else:
                logger.error("display_candidates failed: pdf file missing.")
        boxes = [
            get_box(mention.context) for c in candidates for mention in c.get_mentions()
        ]
        imgs = self.display_boxes(pdf_file, boxes, alternate_colors=True)
        return display(*imgs)
Displays the bounding boxes corresponding to candidates on an image of the pdf
        boxes is a list of 5-tuples (page, top, left, bottom, right)