Python decorator-based function parameter validation