Fixed #24036 -- Added ignore_warnings decorator

```py
with warnings.catch_warnings():
```