code: def _get_primary_type(ttypes, parent, logstream=stderr):
      
      if len(ttypes) > 1:
          if logstream:  # pragma: no branch
              message = '[tag::transcript::primary_transcript]'
              message += ' WARNING: feature {:s}'.format(parent.slug)
              message += ' has multiple associated transcript types'
              message += ' {}'.format(ttypes)
              print(message, file=logstream)
          if 'mRNA' not in ttypes:
              message = (
                  'cannot resolve multiple transcript types if "mRNA" is'
                  ' not one of those types {}'.format(ttypes)
              )
              raise Exception(message)
          ttypes = ['mRNA']
      return ttypes[0]
docs: Check for multiple transcript types and, if possible, select one.