code: def update_docs(path: str, new_version: str):
      print(f"updating docs in {path}")
      with open(path, "r+") as fd:
          content = fd.read()
          fd.seek(0)
          content = re.sub(
              r'datafusion = "(.+)"',
              f'datafusion = "{new_version}"',
              content,
          )
          fd.write(content)
  
file_path: arrow-datafusion/dev/update_datafusion_versions.py
imports: import re
  import argparse
  from pathlib import Path
  import tomlkit
label_desc: Use image node_id 4 for calling a global function with example usage: update_docs(path, new_version) without return types