code: def retrieve_bazel_version():
      """Retrieve installed bazel version (or bazelisk).
  
      Returns:
        The bazel version detected.
      """
      bazel_executable = which("bazel")
      if bazel_executable is None:
          bazel_executable = which("bazelisk")
          if bazel_executable is None:
              print("Cannot find bazel. Please install bazel/bazelisk.")
              sys.exit(1)
  
      stderr = open(os.devnull, "wb")
      curr_version = run_shell(
          [bazel_executable, "--version"],
          allow_non_zero=True,
          stderr=stderr,
      )
      if curr_version.startswith("bazel "):
          curr_version = curr_version.split("bazel ")[1]
  
      curr_version_int = convert_version_to_int(curr_version)
  
      # Check if current bazel version can be detected properly.
      if not curr_version_int:
          print(
              "WARNING: current bazel installation is not a release version."
          )
          return curr_version
  
      print("You have bazel %s installed." % curr_version)
      return curr_version
  
imports: import argparse
  import os
  import pathlib
  import platform
  import re
  import subprocess
  import sys
label_desc: Use image node_id 18 for calling a global function with example usage: retrieve_bazel_version() and returns: curr_version, curr_version