'get_version(default = UNDEFINED)
A convenience method to get tor version that current controller is
connected to.
:param object default: response if the query fails
:returns: :class:`~stem.version.Version` of the tor instance that we\'re
connected to
:raises:
* :class:`stem.ControllerError` if unable to query the version
* **ValueError** if unable to parse the version
An exception is only raised if we weren\'t provided a default response.'

@with_default()
def get_version(self, default=UNDEFINED):

    version = self._get_cache('version')
    if (not version):
        version = stem.version.Version(self.get_info('version'))
        self._set_cache({'version': version})
    return version
