def _get_attachment_keys(zot, coll_id) -> list:
    """Retrieves attachment keys of attachments in provided collection.

    Args:
        zot (zotero.Zotero): Zotero instance
        coll_id (str): Collection ID.

    Returns:
        list: List of attachment keys.
    """
    attach = zot.everything(
        zot.collection_items(coll_id, itemType='attachment'))
    if len(attach) == 0:
        raise KeyError(
            'No attachments exist in this collection')
    else:
        attach_keys = list(set([x['key'] for x in attach]))
        return attach_keys