code: def main(sphinx_build_args: List[str]) -> int:
      p = subprocess.Popen(sphinx_build_args, stderr=subprocess.PIPE)
  
      # Parse stderr for link errors while also passing it through to stdout.
      download_link_errors = []
      for line in p.stderr:
          os.write(sys.stdout.fileno(), line)
          m = re.match(download_file_regex, line)
          if m is not None:
              download_link_errors.append(m.group("filepath"))
  
      ret = p.wait()
      if ret != 0:
          return ret
  
      if len(download_link_errors) == 0:
          return 0
  
      sys.stderr.write(
          "Download links are broken!! ':download:`<path> links`'\n"
          "Full paths:\n"
      )
      for path in download_link_errors:
          sys.stderr.write(f"{path}\n")
  
      sys.stderr.write(
          "Please grep the source for each filename in the docs "
          "and update the docs with the correct file names.\n"
      )
  
      return 1
  
imports: import os
  import re
  import subprocess
  import sys
  import tempfile
  from typing import List
label_desc: Use image node_id 1 for calling a global function with example usage: main(sphinx_build_args) and returns: int, ret, int