code: def get_pydoctor_html_outputdir(pydoctor_url_path):
      """Get HTML output dir for pydoctor"""
      # NOTE: obviously this is a little tricky, but it does work for both
      # the sphinx-build script and the python -m sphinx module calls. It works
      # locally, on github pages, and on RTD.
      return str(Path(sys.argv[-1]) / pydoctor_url_path.strip("/"))
  
file_path: python-igraph/doc/source/conf.py
imports: from datetime import datetime
  import sys
  import os
  import importlib
  from pathlib import Path
label_desc: Use image node_id 4 for calling a global function with example usage: get_pydoctor_html_outputdir(pydoctor_url_path) and returns: str