Refactor image_asserter.