def METHOD_NAME() -> PackagedTask[S]:
    class Executor(Generic[TExecutor]):
        __slots__ = ("resolver",)
        def __init__(self) -> None:
            self.resolver = None  # type: Optional[ResolveFunc[TExecutor]]
        def __call__(self, resolver: ResolveFunc[TExecutor]) -> None:
            self.resolver = resolver
    executor = Executor()  # type: Executor[S]
    promise = Promise(executor)
    assert callable(executor.resolver)
    return promise, executor.resolver