def get_rna_types_from(xrefs, name):
    """
    Determine the rna_types as annotated by some database.

    Parameters
    ----------
    xrefs : iterable
        The list of xrefs to fitler to extract the rna types from.
    name : str
        The name of the database to use.

    Returns
    -------
    rna_types : set
        A set of rna types that is annotated by the given database.
    """

    rna_types = set()
    for xref in xrefs:
        if xref.db.name == name:
            rna_types.add(xref.accession.get_rna_type())
    return rna_types