code: def replace_tags(path: str, old_tag: str, new_tag: str) -> None:
      with open(path) as f:
          lines_in = f.readlines()
  
      lines_out = [line.replace(old_tag, new_tag) for line in lines_in]
  
      # Print git-style diffs.
      print(path, file=sys.stderr)
      for before, after in zip(lines_in, lines_out):
          if before != after:
              print(
                  f"\x1b[31m-{before.rstrip()}\x1b[m", file=sys.stderr
              )
              print(f"\x1b[32m+{after.rstrip()}\x1b[m", file=sys.stderr)
              print(file=sys.stderr)
  
      with open(path, "w") as f:
          f.writelines(lines_out)
  
file_path: determined/tools/scripts/bumpenvs.py
imports: import os
  import subprocess
  import sys
  from typing import List
  from ruamel import yaml
label_desc: Use image node_id 3 for calling a global function with example usage: replace_tags(path, old_tag, new_tag) without return types