code: def patch_vendor_imports(file, replacements):
      text = file.read_text("utf8")
      for replacement in replacements:
          text = replacement(text)
      file.write_text(text, "utf8")
  
file_path: metaflow/metaflow/vendor.py
imports: import glob
  import shutil
  import subprocess
  import re
  from functools import partial
  from itertools import chain
  from pathlib import Path
label_desc: Use image node_id 3 for calling a global function with example usage: patch_vendor_imports(file, replacements) without return types