def get_generic_name(rna_type, sequence, xrefs):
    """
    Compute a generic name that works for sequences that have no specific
    taxon id.

    Parameters
    ----------
    rna_type : str
        The current rna_type for the sequence.
    sequence : Rna
        An Rna model that represents the sequence.

    Returns
    -------
    name : str
        A string naming the sequence.
    """

    rna_type = rna_type.replace('_', ' ')
    species_count = sequence.count_distinct_organisms
    if species_count == 1:
        species = xrefs.first().accession.species
        return '{species} {rna_type}'.format(
            species=species,
            rna_type=rna_type
        )

    return '{rna_type} from {species_count} species'.format(
        rna_type=rna_type,
        species_count=species_count
    )