code: def _match_version_string(version):
      
      matched = _VERSION_STRING_REGEX.match(version)
      g = matched.groups()
      major, minor, micro = g[0], g[2], g[4]
  
      # If, for whatever reason, the binary didn't tell us its version, then
      # these might be (None, None, None), and so we should avoid typecasting
      # them when that is the case.
      if major and minor and micro:
          major, minor, micro = int(major), int(minor), int(micro)
      else:
          raise GnuPGVersionError("Could not parse GnuPG version from: %r" %
                                  version)
  
      return (major, minor, micro)
docs: Sort a binary version string into major, minor, and micro integers.
  
      :param str version: A version string in the form x.x.x
      :raises GnuPGVersionError: if the **version** string couldn't be parsed.
      :rtype: tuple
  
      :returns: A 3-tuple of integers, representing the (MAJOR, MINOR, MICRO)
          version numbers. For example::
  
              _match_version_string("2.1.3")
  
          would return ``(2, 1, 3)``.