test: add unit tests for get_previous_step_or_raise (#1908) (#3218)
* Tests are added at the bottom of test_simple_cache.py
Tests are added at the bottom of test_simple_cache.py
* style: fix import sort to satisfy ruff (I001)
* style: use isort to fix import formatting for Ruff I001
* Update test_simple_cache.py
* Update test_simple_cache.py
* Update test_simple_cache.py
* Update test_simple_cache.py
* Update test_simple_cache.py
* Add missing return type annotations [-> None]