from typing import Iterator


def limit(
        dictset: Iterator[dict],
        limit: int):
    """
    Returns up to 'limit' number of records
    """
    counter = limit
    for record in dictset:
        if counter == 0:
            return None
        counter -= 1
        yield record