## Depth Pooling Fixes - Fixed `np.errstate` usage: `all_nan` is not a valid parameter for `errstate`. Changed to `invalid="ignore"`. - Fixed `conf_stack` possibly unbound error by initializing it to `None` and checking it before use. - Removed duplicated unreachable code block after the first `return`. - Fixed implicit string concatenation warning in `ValueError` message. - Updated type hints to modern Python style (`list[]`, `|`) and removed unused `typing` imports. - Verified with `basedpyright` (0 errors).