def METHOD_NAME(filename: str) -> PackageMap:
    result: PackageMap = {}
    for line in open(filename, 'rb'):
        if line.startswith(b'#'):
            continue
        line = line.rstrip()
        package = line.split(b'=')[0]
        if package == 'empty':
            continue
        package = cast(Tuple[bytes, bytes, bytes], tuple(package.split(b':')))
        result.setdefault(package[:-1], set()).add(package[-1])
    return result