def METHOD_NAME(mirror):
    """
    Check reference switches of both axes of the mirror
    """
    # we rely on the fact that the axes S/L are 0/1 with reference switches
    # powered via output port 0
    # Turn on the reference switches power
    mirror.SetIO(2, 0, 1)
    # Check left/right switch values are opposite
    try:
        error = False
        for name, axis in {"s": 0, "l": 1}.items():
            vr = mirror.GetAxisParam(axis, 10)
            vl = mirror.GetAxisParam(axis, 11)
            if vl == vr:
                logging.error("Reference switches for axis %s both have value %d", name, vr)
                error = True
            else:
                logging.info("Reference switches for axis %s seem correct (left reports %d)", name, vl)
    finally:
        # Turn on the reference switches power
        mirror.SetIO(2, 0, 0)
    if error:
        raise ValueError("Reference switches didn't appear correct")