code: def parse_version_info(version):
      
      parts = parse(version)
      version_info = VersionInfo(
              parts['major'], parts['minor'], parts['patch'],
              parts['prerelease'], parts['build'])
  
      return version_info
docs: Parse version string to a VersionInfo instance.
  
      :param version: version string
      :return: a :class:`VersionInfo` instance
      :rtype: :class:`VersionInfo`
  
      >>> import semver
      >>> version_info = semver.parse_version_info("3.4.5-pre.2+build.4")
      >>> version_info.major
      3
      >>> version_info.minor
      4
      >>> version_info.patch
      5
      >>> version_info.prerelease
      'pre.2'
      >>> version_info.build
      'build.4'