code: def same_page(c):
      
      return all(
          [
              _to_span(c[i]).sentence.is_visual()
              and bbox_from_span(_to_span(c[i])).page
              == bbox_from_span(_to_span(c[0])).page
              for i in range(len(c))
          ]
      )
docs: Return true if all the components of c are on the same page of the document.
  
      Page numbers are based on the PDF rendering of the document. If a PDF file is
      provided, it is used. Otherwise, if only a HTML/XML document is provided, a
      PDF is created and then used to determine the page number of a Mention.
  
      :param c: The candidate to evaluate
      :rtype: boolean