'Return the version of the Linux distribution, as a string.
For details, see :func:`distro.version`.'

def version(self, pretty=False, best=False):

    versions = [self.os_release_attr('version_id'), self.lsb_release_attr('release'), self.distro_release_attr('version_id'), self._parse_distro_release_content(self.os_release_attr('pretty_name')).get('version_id', ''), self._parse_distro_release_content(self.lsb_release_attr('description')).get('version_id', '')]
    version = ''
    if best:
        for v in versions:
            if ((v.count('.') > version.count('.')) or (version == '')):
                version = v
    else:
        for v in versions:
            if (v != ''):
                version = v
                break
    if (pretty and version and self.codename()):
        version = u'{0}    ({1})'.format(version, self.codename())
    return version
