def flatten_collections(items: list) -> list:
    """When creating nested collections, will flatten all the requests to a list of dicts."""
    lst = list()
    for item in items:
        if isinstance(item, list):  # A list of collections
            lst += flatten_collections(item)
        elif isinstance(item, dict) and 'item' in item:  # Get requests from collection
            lst += flatten_collections(item['item'])
        else:  # Request itself is a dict.
            lst.append(item)
    return lst