def abfSort(IDs):
IDs=list(IDs)<EOL>monO=[]<EOL>monN=[]<EOL>monD=[]<EOL>good=[]<EOL>for ID in IDs:<EOL><INDENT>if ID is None:<EOL><INDENT>continue<EOL><DEDENT>if '<STR_LIT:o>' in ID:<EOL><INDENT>monO.append(ID)<EOL><DEDENT>elif '<STR_LIT:n>' in ID:<EOL><INDENT>monN.append(ID)<EOL><DEDENT>elif '<STR_LIT:d>' in ID:<EOL><INDENT>monD.append(ID)<EOL><DEDENT>else:<EOL><INDENT>good.append(ID)<EOL><DEDENT><DEDENT>return sorted(good)+sorted(monO)+sorted(monN)+sorted(monD)<EOL>
given a list of goofy ABF names, return it sorted intelligently.
This places things like 16o01001 after 16901001.