def get_items(iter, n):
    """Return the first n items from the iterator as a list."""
    output = []
    if not n:
        return output

    for item in iter:
        output.append(item)
        if len(output) == n:
            break

    return output