The answer is "3. Both." Every layer offers a specific interface, and this interface has specific constraints. These constraints should always be enforced by means of validation. One layer is not supposed to do another layer's validation, nor rely on another layer to do its validation for it. If you move a layer into a different system, it should still be able to function.
All unexpected exceptions (exceptions about things that normally should not happen) indicate a bug in the code that threw the exception, except "InvalidArgumentException", which indicates a bug in the code that called the code that threw the exception.
So, if layer A invokes layer B, and layer A contains a bug causing it to pass wrong information to layer B, but layer B does not do its own validation, then layer B will throw some "FailedToDoWhatYouAskedMeToDo" exception, at which point you will naturally start looking for the bug in layer B. If layer B does its own validation, then layer B will throw an "InvalidArgumentException" instead, thus pointing you to look for the bug in layer A.
So, if you do not have every layer do its own validation, then you will be constantly confused about where a bug is. You will often have one layer which is throwing an exception for a bug which exists in another layer, which is another way of saying that you may have a bug somewhere and expect a different layer to find it. This is chaos, and to be avoided at all costs.
There is a subtle point which is perhaps worth mentioning in the case of Python, because as far as I know, Python is a bit inconvenienced with respect to distinguishing public vs. private stuff. Normally, you may avoid duplication of validation within a specific layer, by having only public functions do validation. In other words, private functions of a layer do not need to be repeating validation that has already been done by public functions. But if all functions are public, then all of them need to do validation.