def METHOD_NAME():
    try:
        from psychopy.hardware.crs.bits import BitsSharp
    except (ModuleNotFoundError, ImportError):
        return
    win = visual.Window([1024, 768], fullscr=0, screen=1, useFBO=True,
                        autoLog=True)
    bits = BitsSharp(win, mode='bits++', noComms=True)
    # draw a ramp across the screenexpectedVals = range(256)
    w, h = win.size
    intended = list(range(256))
    testArrLums = np.resize(intended,
                            [256, 256]) / 127.5 - 1  # NB psychopy uses -1:1
    stim = visual.ImageStim(win, image=testArrLums,
                            size=[256, h], pos=[128 - w / 2, 0], units='pix',
                            )
    expected = np.repeat(intended, 3).reshape([-1, 3])
    # stick something in the middle for fun!
    gabor = visual.GratingStim(win, mask='gauss', sf=3, ori=45, contrast=0.5)
    gabor.autoDraw = True
    #a dict of dicts for expected vals
    for mode in ['bits++', 'mono++', 'color++']:
        bits.mode=mode
        for finalVal in [255.0, 1024, 65535]:
            thisExpected = expectedVals[mode][finalVal]
            intended = np.linspace(0.0,1,256)*255.0/finalVal
            stim.image = np.resize(intended,[256,256])*2-1 #NB psychopy uses -1:1
            stim.draw()
            #fr = np.array(win._getFrame(buffer='back').transpose(Image.ROTATE_270))
            win.flip()
            fr = np.array(win._getFrame(buffer='front').transpose(Image.ROTATE_270))
            if not systemtools.isVM_CI():
                assert np.alltrue(thisExpected['lowR'] == fr[0:10, -1, 0])
                assert np.alltrue(thisExpected['lowG'] == fr[0:10, -1, 1])
                assert np.alltrue(thisExpected['highR'] == fr[250:256, -1, 0])
                assert np.alltrue(thisExpected['highG'] == fr[250:256, -1, 1])
                print('R', repr(fr[0:10,-1,0]), repr(fr[250:256,-1,0]))
                print('G', repr(fr[0:10,-1,1]), repr(fr[250:256,-1,0]))
            #event.waitKeys()