I think you want to use it as a fixture to benefit from pytest's caching.