docstr: This function is different from the original method only in doing some surgery on the paths
  it finds when a separate root directory is configured.
code: def process_doc(
      self: asset.DownloadFileCollector,
      app: application.Sphinx,
      doctree: nodes.document,
  ) -> None:
      """
      This function is different from the original method only in doing some surgery on the paths
      it finds when a separate root directory is configured.
      """
      for node in doctree.traverse(addnodes.download_reference):
          targetname = node["reftarget"]
          if "://" in targetname:
              node["refuri"] = targetname
          else:
              rel_filename, filename = app.env.relfn2path(
                  targetname, app.env.docname
              )
              if app.config.dai_downloads_root:
                  filename = os.path.abspath(
                      os.path.join(
                          app.config.dai_downloads_root, rel_filename
                      )
                  )
                  rel_filename = os.path.relpath(
                      filename, app.env.srcdir
                  )
              app.env.dependencies[app.env.docname].add(rel_filename)
              if not os.access(filename, os.R_OK):
                  logger.warning(
                      __("download file not readable: %s") % filename
                  )
                  continue
              node["filename"] = app.env.dlfiles.add_file(
                  app.env.docname, rel_filename
              )
  
file_path: determined/docs/sphinx_ext_downloads.py
imports: import logging
  import os
  import types
  from typing import Any, Dict
  from docutils import nodes
  from sphinx import addnodes, application
  from sphinx.environment.collectors import asset
  from sphinx.locale import __
label_desc: Use image node_id 1 for calling the DownloadExternalFileCollector obj's underlying member method code with example usage: obj.process_doc(app, doctree) without return types