Refactor and add unit tests for function: pyxel.calibration.util.check_ranges.
pyxel.calibration.util.check_ranges