code: def version():
      """Return the version number tuple from the ``stderr`` output of ``dot -V``.
  
      Returns:
          Two, three, or four ``int`` version ``tuple``.
      Raises:
          graphviz.ExecutableNotFound: If the Graphviz executable is not found.
          subprocess.CalledProcessError: If the exit status is non-zero.
          RuntimmeError: If the output cannot be parsed into a version number.
  
      Note:
          Ignores the ``~dev.<YYYYmmdd.HHMM>`` portion of development versions.
  
      See also:
          Graphviz Release version entry format
          https://gitlab.com/graphviz/graphviz/-/blob/f94e91ba819cef51a4b9dcb2d76153684d06a913/gen_version.py#L17-20
      """
      cmd = ["dot", "-V"]
      out, _ = run(
          cmd,
          check=True,
          encoding="ascii",
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
      )
  
      ma = re.search(
          r"graphviz version"
          r" "
          r"(\d+)\.(\d+)"
          r"(?:\.(\d+)"
          r"(?:"
          r"~dev\.\d{8}\.\d{4}"
          r"|"
          r"\.(\d+)"
          r")?"
          r")?"
          r" ",
          out,
      )
      if ma is None:
          raise RuntimeError("cannot parse %r output: %r" % (cmd, out))
  
      return tuple(int(d) for d in ma.groups() if d is not None)
  
imports: import errno
  import logging
  import os
  import platform
  import re
  import subprocess
  from .None import _compat
  from .None import tools
label_desc: Use image node_id 6 for calling a global function with example usage: version() and returns: tuple