docs: def _to_png(self, delay=3):
          """Export the HTML to byte representation of a PNG image.
  
          Uses selenium to render the HTML and record a PNG. You may need to
          adjust the `delay` time keyword argument if maps render without data or tiles.
  
          Examples
          --------
          >>> m._to_png()
          >>> m._to_png(time=10)  # Wait 10 seconds between render and snapshot.
  
          """
          if self._png_image is None:
              from selenium import webdriver
  
              options = webdriver.firefox.options.Options()
              options.add_argument('--headless')
              driver = webdriver.Firefox(options=options)
  
              html = self.get_root().render()
              with _tmp_html(html) as fname:
                  # We need the tempfile to avoid JS security issues.
                  driver.get('file:///{path}'.format(path=fname))
                  driver.maximize_window()
                  time.sleep(delay)
                  png = driver.get_screenshot_as_png()
                  driver.quit()
              self._png_image = png
          return self._png_image