def extract_items(topitems_or_libraryitems):
    """
    Extracts a sequence of items from a sequence of TopItem or
    LibraryItem objects.
    """

    seq = []
    for i in topitems_or_libraryitems:
        seq.append(i.item)

    return seq