code: def get_rasa_version_from_pyproject(pyproject_file=None) -> str:
      """Fetch rasa version from pyproject."""
      if pyproject_file is None:
          pyproject_file = pyproject_file_path()
  
      try:
          data = toml.load(pyproject_file)
          rasa_oss_version = data["tool"]["poetry"]["version"]
          return rasa_oss_version
      except (FileNotFoundError, TypeError):
          print(
              f"Unable to fetch from {pyproject_file}: file not found."
          )
          sys.exit(1)
      except toml.TomlDecodeError:
          print(
              f"Unable to parse {pyproject_file}: incorrect TOML file."
          )
          sys.exit(1)
  
imports: import os
  from pathlib import Path
  import sys
  import toml
label_desc: Use image node_id 3 for calling a global function with example usage: get_rasa_version_from_pyproject(pyproject_file) and returns: rasa_oss_version