Preserve the compaction option tests and upstream CUDA tests by retaining both Any and MagicMock imports.
Validation: rebuilt the Python extension against Lance v15; 29 optimize/CUDA tests and 7 storage documentation tests passed. Rust formatting and Python source checks passed. Full repository Ruff still reports 49 inherited documentation example errors.