def METHOD_NAME(policy, resource):
    if type(resource) == "PythonModuleSource":
        resource.add_include = True
        for prefix in excluded_source_prefixes:
            if resource.name.startswith(prefix):
                resource.add_include = False
        # if resource.add_include:
        #     print("src", resource.name, resource.add_include)
    elif type(resource) == "PythonExtensionModule":
        resource.add_include = True
        if resource.name.startswith("win32") or resource.name.startswith("PyQt6"):
            resource.add_include = False
        # print("ext", resource.name, resource.add_include)
    elif type(resource) == "PythonPackageResource":
        for prefix in included_resource_packages:
            if resource.package.startswith(prefix):
                resource.add_include = True
                if resource.package == "certifi":
                    resource.add_location = "filesystem-relative:lib"
        for suffix in excluded_resource_suffixes:
            if resource.name.endswith(suffix):
                resource.add_include = False
        # aqt web resources can be stored in binary
        if resource.package.endswith("aqt"):
            if not resource.name.startswith("data/web"):
                resource.add_location = "filesystem-relative:lib"
        # if resource.add_include:
        #     print("rsrc", resource.package, resource.name, resource.add_include)
    elif type(resource) == "PythonPackageDistributionResource":
        # print("dist", resource.package, resource.name, resource.add_include)
        pass
        # elif type(resource) == "File":
        #     print(resource.path)
    elif type(resource) == "File":
        if (
            resource.path.startswith("win32")
            or resource.path.startswith("pythonwin")
            or resource.path.startswith("pywin32")
        ):
            exclude = (
                "tests" in resource.path
                or "benchmark" in resource.path
                or "__pycache__" in resource.path
            )
            if not exclude:
                # print("add", resource.path)
                resource.add_include = True
                resource.add_location = "filesystem-relative:lib"
        if ".dist-info" in resource.path:
            resource.add_include = False
    else:
        print("unexpected type", type(resource))