Maybe a `functools.cache` is the simplest method here? N.B. mimics the built-in warnings behaviour
Maybe a
functools.cacheis the simplest method here?N.B. mimics the built-in warnings behaviour