code: def main():
      parser = argparse.ArgumentParser(
          description=(
              "Update datafusion crate version and corresponding version pins "
              "in downstream crates."
          )
      )
      parser.add_argument(
          "new_version", type=str, help="new datafusion version"
      )
      args = parser.parse_args()
  
      new_version = args.new_version
      repo_root = Path(__file__).parent.parent.absolute()
  
      print(f"Updating workspace in {repo_root} to {new_version}")
      update_workspace_version(new_version)
  
      print(
          f"Updating datafusion crate versions in {repo_root} to {new_version}"
      )
      for cargo_toml in crates.values():
          update_datafusion_version(cargo_toml, new_version)
  
      print(
          f"Updating datafusion dependency versions in {repo_root} to {new_version}"
      )
      for cargo_toml in crates.values():
          update_downstream_versions(cargo_toml, new_version)
  
      update_docs("README.md", new_version)
  
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 5 for calling a global function with example usage: main() without return types