code: def toolchain_version(toolchain=None) -> List[int]:
      """Return the version of the Hexagon toolchain.
  
      Parameters
      ----------
      toolchain: str, optional
          Path to the Hexagon toolchain. If not provided, the environment
          variable HEXAGON_TOOLCHAIN is used.
  
      Returns
      -------
      version: List[int]
          List of numerical components of the version number. E.g. for version
          "8.5.06" it will be [8, 5, 6].
      """
  
      if toolchain is None:
          toolchain = HEXAGON_TOOLCHAIN
      assert (
          toolchain is not None
      ), "Please specify toolchain, or set HEXAGON_TOOLCHAIN variable"
      result = subprocess.run(
          [f"{toolchain}/bin/hexagon-clang", "-v"],
          capture_output=True,
          check=True,
      )
      output = result.stderr.decode()
      for line in output.splitlines():
          m = re.match(r".* [Cc]lang version ([0-9\.]+)", line)
          if m:
              assert len(m.groups()) == 1
              return [int(v) for v in m.group(1).split(".")]
      raise RuntimeError("Cannot establish toolchain version")
  
imports: import os
  import pathlib
  import re
  from typing import List, Union
  import subprocess
  import sys
  import tarfile
  import io
  import numpy
  import tvm
  import tvm.contrib.cc
  from ..._ffi.registry import register_func
label_desc: Use image node_id 4 for calling a global function with example usage: toolchain_version(toolchain) and returns: unknown