code: def write_json(obj, path):
      tmp = DIR / "tmp"
      with tmp.open("w") as f:
          out = dict(l.to_sphinx() for l in links)
          json.dump(obj, f, indent="    ")
          f.write("\n")
      tmp.rename(path)
  
file_path: determined/docs/redirects.py
imports: import argparse
  import collections
  import itertools
  import json
  import os
  import pathlib
  import subprocess
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: write_json(obj, path) without return types