def METHOD_NAME(device, entrancep, exitp, offset):
    if entrancep not in (0, 1) or exitp not in (0, 1):
        raise ValueError("Entrance and exit setting must be 0 or 1")
    device.SetDetectorOffset(entrancep, exitp, offset)
    logging.info("Detector offset is at %d", device.GetDetectorOffset(entrancep, exitp))