def check_AP_group(abf=exampleABF,sweep=<NUM_LIT:0>):
abf.setSweep(sweep)<EOL>swhlab.plot.new(abf,title="<STR_LIT>"%(abf.currentSweep,abf.protoSeqY[<NUM_LIT:1>]))<EOL>swhlab.plot.sweep(abf)<EOL>SAP=cm.matrixToDicts(abf.SAP[sweep])<EOL>if "<STR_LIT>" in SAP.keys():<EOL><INDENT>T1=SAP["<STR_LIT>"]<EOL>T2=SAP["<STR_LIT>"]<EOL>pylab.axvspan(T1/abf.rate,T2/abf.rate,color='<STR_LIT:r>',alpha=<NUM_LIT>)<EOL><DEDENT>else:<EOL><INDENT>T1=<NUM_LIT:0><EOL>T2=abf.sweepLength<EOL><DEDENT>swhlab.plot.annotate(abf)<EOL>pylab.tight_layout()<EOL>pylab.subplots_adjust(right=<NUM_LIT>)<EOL>pylab.annotate(cm.msgDict(SAP),(<NUM_LIT>,<NUM_LIT>),ha='<STR_LIT:left>',va='<STR_LIT>',<EOL>weight='<STR_LIT>',family='<STR_LIT>',<EOL>xycoords='<STR_LIT>',size=<NUM_LIT:12>,color='<STR_LIT:g>')<EOL>pylab.axis([T1-<NUM_LIT>,T2+<NUM_LIT>,None,None])<EOL>
after running detect() and abf.SAP is populated, this checks it.