from typing import Callable, ParamSpec, TypeVar, Coroutine, Any, Union
P = ParamSpec('P')
F = TypeVar('F', bound=Callable[P, Any])
G = TypeVar('G', bound=Callable[P, Coroutine[Any, Any, Any]])
H = TypeVar('H', bound=Union[Callable[P, Any], Callable[P, Coroutine[Any, Any, Any]]])
Either these should pass type checking, or the error message should be updated to indicate what the problem actually is.