Replace compose class with compose function in functional.py
It seems compose class could be converted to a function and use the initialization arguments as named arguments for the function instead.
Also the class name does not follow the default PEP 8 class naming CapWords convention (although PEP 8 does accept classes that are mainly used as callables to use the function naming convention). For regular Python users this can be confusing.
That architectural change would require some effort, instead of overriding __call__, to a function returning a function (i.e. if we were to preserve API).
The current situation [edit: is akin to the "builder pattern" which is a nice UAPI UX, and ] the implementation is not PEP-8 invalid, as you wrote.
So what would be the benefit of a functional, function factory?