I would like to create a type annotation T that describes a type that must be a subclass of both class A and class B.
T = TypeVar('T', bound=A) only specifies that T must be a subclass of A.
T = TypeVar('T', A, B) only specifies that T must be a subclass of A or a subclass of B but not necessarily both.
I actually want something like T = TypeVar('T', bound=[A, B]) which would mean T must subclass both A and B. Is there a standard way of doing this?