code: def display_boxes(self, tree, html_path, filename_prefix, alternate_colors=False):
          
          imgs = []
          colors = {
              "section_header": Color("blue"),
              "figure": Color("green"),
              "figure_caption": Color("green"),
              "table_caption": Color("red"),
              "list": Color("yellow"),
              "paragraph": Color("gray"),
              "table": Color("red"),
              "header": Color("brown"),
          }
          for i, page_num in enumerate(tree.keys()):
              img = self.pdf_to_img(page_num)
              draw = Drawing()
              draw.fill_color = Color("rgba(0, 0, 0, 0.0)")
              for clust in tree[page_num]:
                  for (pnum, pwidth, pheight, top, left, bottom, right) in tree[page_num][
                      clust
                  ]:
                      draw.stroke_color = colors[clust]
                      draw.rectangle(left=left, top=top, right=right, bottom=bottom)
                      draw.push()
                      draw.font_size = 20
                      draw.font_weight = 10
                      draw.fill_color = colors[clust]
                      if int(left) > 0 and int(top) > 0:
                          draw.text(x=int(left), y=int(top), body=clust)
                      draw.pop()
              draw(img)
              img.save(filename=html_path + filename_prefix + "_page_" + str(i) + ".png")
              imgs.append(img)
          return imgs
docs: Displays each of the bounding boxes passed in 'boxes' on images of the pdf
          pointed to by pdf_file
          boxes is a list of 5-tuples (page, top, left, bottom, right)