def get_start_stops(transcript_sequence, start_codons=None, stop_codons=None):
transcript_sequence = transcript_sequence.upper()  <EOL>if not start_codons:<EOL><INDENT>start_codons = ['<STR_LIT>']<EOL><DEDENT>if not stop_codons:<EOL><INDENT>stop_codons = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL><DEDENT>seq_frames = {<NUM_LIT:1>: {'<STR_LIT>': [], '<STR_LIT>': []},<EOL><NUM_LIT:2>: {'<STR_LIT>': [], '<STR_LIT>': []},<EOL><NUM_LIT:3>: {'<STR_LIT>': [], '<STR_LIT>': []}}<EOL>for codons, positions in ((start_codons, '<STR_LIT>'),<EOL>(stop_codons, '<STR_LIT>')):<EOL><INDENT>if len(codons) > <NUM_LIT:1>:<EOL><INDENT>pat = re.compile('<STR_LIT:|>'.join(codons))<EOL><DEDENT>else:<EOL><INDENT>pat = re.compile(codons[<NUM_LIT:0>])<EOL><DEDENT>for m in re.finditer(pat, transcript_sequence):<EOL><INDENT>start = m.start() + <NUM_LIT:1><EOL>rem = start % <NUM_LIT:3><EOL>if rem == <NUM_LIT:1>:  <EOL><INDENT>seq_frames[<NUM_LIT:1>][positions].append(start)<EOL><DEDENT>elif rem == <NUM_LIT:2>:  <EOL><INDENT>seq_frames[<NUM_LIT:2>][positions].append(start)<EOL><DEDENT>elif rem == <NUM_LIT:0>:  <EOL><INDENT>seq_frames[<NUM_LIT:3>][positions].append(start)<EOL><DEDENT><DEDENT><DEDENT>return seq_frames<EOL>
Return start and stop positions for all frames in the given
    transcript.