code: def update_workspace_version(new_version: str):
      cargo_toml = "Cargo.toml"
      print(f"updating {cargo_toml}")
      with open(cargo_toml) as f:
          data = f.read()
  
      doc = tomlkit.parse(data)
      pkg = doc.get("workspace").get("package")
  
      print("workspace pacakge", pkg)
      pkg["version"] = new_version
  
      with open(cargo_toml, "w") as f:
          f.write(tomlkit.dumps(doc))
  
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 1 for calling a global function with example usage: update_workspace_version(new_version) without return types