def _get_primary_type(ttypes, parent, logstream=stderr):
if len(ttypes) > <NUM_LIT:1>:<EOL><INDENT>if logstream:  <EOL><INDENT>message = '<STR_LIT>'<EOL>message += '<STR_LIT>'.format(parent.slug)<EOL>message += '<STR_LIT>'<EOL>message += '<STR_LIT>'.format(ttypes)<EOL>print(message, file=logstream)<EOL><DEDENT>if '<STR_LIT>' not in ttypes:<EOL><INDENT>message = (<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(ttypes)<EOL>)<EOL>raise Exception(message)<EOL><DEDENT>ttypes = ['<STR_LIT>']<EOL><DEDENT>return ttypes[<NUM_LIT:0>]<EOL>
Check for multiple transcript types and, if possible, select one.