Fair. I personally prefer to see the expectation to the arguments (especially in a scientific / data science context) over looking into asserts in the function body, which distract from the algorithm in there. Originally, I planned to automatically include the lambdas in the docstring/sphinx but unfortunately, Python does not keep the source code of the lambda (only the whole line and parsing would be overkill).
I did not understand your second remark, could you clarify please?