code: def ask_version() -> Text:
      """Allow the user to confirm the version number."""
  
      def is_valid_version_number(v: Text) -> bool:
          return v in {
              "major",
              "minor",
              "micro",
              "alpha",
              "rc",
          } or is_valid_version(v)
  
      current_version = Version(get_current_version())
      next_micro_version = str(current_version.next_micro())
      next_alpha_version = str(current_version.next_alpha())
      version = questionary.text(
          f"What is the version number you want to release "
          f"('major', 'minor', 'micro', 'alpha', 'rc' or valid version number "
          f"e.g. '{next_micro_version}' or '{next_alpha_version}')?",
          validate=is_valid_version_number,
      ).ask()
  
      if version in PRERELEASE_FLAVORS and not current_version.pre:
          # at this stage it's hard to guess the kind of version bump the
          # releaser wants, so we ask them
          if version == "alpha":
              choices = [
                  str(current_version.next_alpha("minor")),
                  str(current_version.next_alpha("micro")),
                  str(current_version.next_alpha("major")),
              ]
          else:
              choices = [
                  str(current_version.next_release_candidate("minor")),
                  str(current_version.next_release_candidate("micro")),
                  str(current_version.next_release_candidate("major")),
              ]
          version = questionary.select(
              f"Which {version} do you want to release?",
              choices=choices,
          ).ask()
  
      if version:
          return version
      else:
          print("Aborting.")
          sys.exit(1)
  
imports: import argparse
  import os
  import re
  import sys
  from pathlib import Path
  from subprocess import CalledProcessError, check_call, check_output
  from typing import Text, Set
  import questionary
  import toml
  from pep440_version_utils import Version, is_valid_version
label_desc: Use image node_id 9 for calling a global function with example usage: ask_version() and returns: unknown, version