code: def get_doc(logger=None, plugin=None, reporthook=None):
      from ginga.GingaPlugin import GlobalPlugin, LocalPlugin
      if isinstance(plugin, GlobalPlugin):
          plugin_page = 'plugins_global'
          plugin_name = str(plugin)
      elif isinstance(plugin, LocalPlugin):
          plugin_page = 'plugins_local'
          plugin_name = str(plugin)
      else:
          plugin_page = None
          plugin_name = None
      try:
          index_html = _download_rtd_zip(reporthook=reporthook)
      except Exception as e:
          url = 'https://ginga.readthedocs.io/en/latest/'
          if plugin_name is not None:
              if toolkit.family.startswith('qt'):
                  url = None
              else:
                  url += 'manual/{}/{}.html'.format(plugin_page, plugin_name)
          if logger is not None:
              logger.error(str(e))
      else:
          pfx = 'file:'
          url = '{}{}'.format(pfx, index_html)
          if plugin_name is not None:
              url += '
      return url