code: def _get_major_minor_revision(self, version_string):
          
          version = version_string.split(' ')[0].split('.')
          v_major = int(version[0])
          v_minor = int(re.match('\d+', version[1]).group())
          if len(version) >= 3:
              v_revision = int(re.match('\d+', version[2]).group())
          else:
              v_revision = 0
          return v_major, v_minor, v_revision
docs: Split a version string into major, minor and (optionally)
          revision parts.
  
          This is complicated by the fact that a version string can be
          something like 3.2b1.