def get_contents(collection_id, collections_referenced):
    """Return the ``contents`` value of the collection with ``collection_id`` as its ``id`` value.

    :param int collection_id: the ``id`` value of a collection model.
    :param dict collections_referenced: the collections (recursively) referenced by a collection.
    :returns: the contents of a collection, or a warning message.

    """
    return getattr(collections_referenced[collection_id],
                   u'contents',
                   u'Collection %d has no contents.' % collection_id)