from typing import List


def collection_as_dict(collection: list) -> List[dict]:
    """
    Convert from list of Spark Rows to list of dicts.

    Parameters
    ----------
    collection : list
        List of Spark Rows

    Returns
    -------
    map
        An iterable list of dicts
    """

    return [item.asDict() for item in collection]