def METHOD_NAME(content: str) -> Dict[Package, str]:
    packages = {}
    for line in content.splitlines():
        if not line.startswith('#'):
            segments = line.split(';')
            package = segments[0]
            version = None if len(segments) == 1 else segments[1]
            package_segments = package.split(':')
            if len(package_segments) == 2:
                packages[Package(package_segments[0], package_segments[1])] = version
    return packages