def METHOD_NAME(device, slit, offset):
    if not (andorshrk.SLIT_INDEX_MIN <= slit <= andorshrk.SLIT_INDEX_MAX):
        raise ValueError("Slit must be between 1 and 4")
    if not device.AutoSlitIsPresent(slit):
        raise ValueError("Slit %d is not present" % (slit,))
    # On old firmware, this will fail with "Communication error"
    try:
        device.SetSlitZeroPosition(slit, offset)
    except ShamrockError as ex:
        if ex.errno == 20201:
            raise IOError("Received \"%s\" when changing slit zero position. Is it a SR-193 with a new firmware?" % (ex,))
        else:
            raise
    logging.info("Slit %d offset is at %d", slit, device.GetSlitZeroPosition(slit))
    # As the offset is changed, the slit position is changed (although it hasn't
    # actually moved) => force position update in case we are using the backend.
    device._updatePosition()