code: def _write_version(fname: str) -> None:
      """Used by setup.py to write the specified version info into the source tree."""
      release_version = _get_version_for_build()
      old_version_string = "_release_version: str | None = None"
      new_version_string = (
          f"_release_version: str = {release_version!r}"
      )
      fhandle = pathlib.Path(fname)
      contents = fhandle.read_text()
      # Expect two occurrences: one above, and one here.
      if contents.count(old_version_string) != 2:
          raise RuntimeError(
              f"Build: could not find {old_version_string!r} in {fname}"
          )
      contents = contents.replace(
          old_version_string, new_version_string
      )
  
      githash = os.environ.get("JAX_GIT_HASH")
      if githash:
          old_githash_string = "_git_hash: str | None = None"
          new_githash_string = f"_git_hash: str = {githash!r}"
          if contents.count(old_githash_string) != 2:
              raise RuntimeError(
                  f"Build: could not find {old_githash_string!r} in {fname}"
              )
          contents = contents.replace(
              old_githash_string, new_githash_string
          )
      fhandle.write_text(contents)
  
file_path: jax/jax/version.py
imports: from __future__ import annotations
  import datetime
  import os
  import pathlib
  import subprocess
label_desc: Use image node_id 5 for calling a global function with example usage: _write_version(fname) without return types