def searchAccession(acc):
<EOL>out, error = entrez('<STR_LIT>', acc)<EOL>for line in out.splitlines():<EOL><INDENT>line = line.decode('<STR_LIT:ascii>').strip()<EOL>if '<STR_LIT>' in line or '<STR_LIT>' in line:<EOL><INDENT>newAcc = line.split('<STR_LIT:>>')[<NUM_LIT:1>].split('<STR_LIT:<>')[<NUM_LIT:0>].split('<STR_LIT:.>')[<NUM_LIT:0>].split('<STR_LIT:U+002C>')[<NUM_LIT:0>]<EOL>if len(newAcc) > <NUM_LIT:0>:<EOL><INDENT>return (True, acc, newAcc)<EOL><DEDENT><DEDENT><DEDENT>out, error = entrez('<STR_LIT>', acc)<EOL>for line in out.splitlines():<EOL><INDENT>line = line.decode('<STR_LIT:ascii>').strip()<EOL>if '<STR_LIT>' in line or '<STR_LIT>' in line:<EOL><INDENT>newAcc = line.split('<STR_LIT:>>')[<NUM_LIT:1>].split('<STR_LIT:<>')[<NUM_LIT:0>].split('<STR_LIT:.>')[<NUM_LIT:0>].split('<STR_LIT:U+002C>')[<NUM_LIT:0>]<EOL>if len(newAcc) > <NUM_LIT:0>:<EOL><INDENT>return (True, acc, newAcc)<EOL><DEDENT><DEDENT><DEDENT>out, error = entrez('<STR_LIT>', acc)<EOL>for line in out.splitlines():<EOL><INDENT>line = line.decode('<STR_LIT:ascii>').strip()<EOL>if '<STR_LIT>' in line or '<STR_LIT>' in line:<EOL><INDENT>newAcc = line.split('<STR_LIT:>>')[<NUM_LIT:1>].split('<STR_LIT:<>')[<NUM_LIT:0>].split('<STR_LIT:.>')[<NUM_LIT:0>].split('<STR_LIT:U+002C>')[<NUM_LIT:0>]<EOL>if len(newAcc) > <NUM_LIT:0>:<EOL><INDENT>return (True, acc, newAcc)<EOL><DEDENT><DEDENT><DEDENT>for error in error.splitlines():<EOL><INDENT>error = error.decode('<STR_LIT:ascii>').strip()<EOL>if '<STR_LIT>' in error:<EOL><INDENT>return (False, acc, '<STR_LIT>')<EOL><DEDENT><DEDENT>return (False, acc, '<STR_LIT>')<EOL>
attempt to use NCBI Entrez to get
BioSample ID