def list_views(collection) -> list:
    """ finds a given collection's `_design`-docs and extracts the view names
    found inside of them.

    :param collection: couchdb collection
    :type collection: :class:`couchdb.Database`
    :rtype: list
    """
    desdocs = [collection[name] for name in collection if name.startswith("_design/")]
    views = []
    for doc in desdocs:
        path = doc.id.split("/")[-1]
        views.extend(map(lambda v: path + "/" + v, doc.get("views", {}).keys()))
    return views