code: def get_version():
      
      proc = tmux_cmd('-V')
      if proc.stderr:
          if proc.stderr[0] == 'tmux: unknown option -- V':
              if sys.platform.startswith("openbsd"):  # openbsd has no tmux -V
                  return LooseVersion('%s-openbsd' % TMUX_MAX_VERSION)
              raise exc.LibTmuxException(
                  'libtmux supports tmux %s and greater. This system'
                  ' is running tmux 1.3 or earlier.' % TMUX_MIN_VERSION
              )
          raise exc.VersionTooLow(proc.stderr)
  
      version = proc.stdout[0].split('tmux ')[1]
  
      # Allow latest tmux HEAD
      if version == 'master':
          return LooseVersion('%s-master' % TMUX_MAX_VERSION)
  
      version = re.sub(r'[a-z-]', '', version)
  
      return LooseVersion(version)
docs: Return tmux version.
  
      If tmux is built from git master, the version returned will be the latest
      version appended with -master, e.g. ``2.4-master``.
  
      If using OpenBSD's base system tmux, the version will have ``-openbsd``
      appended to the latest version, e.g. ``2.4-openbsd``.
  
      Returns
      -------
      :class:`distutils.version.LooseVersion`
          tmux version according to :func:`libtmux.common.which`'s tmux