def iterate_task_executions(client, node_execution_identifier, limit=None,
    filters=None):
    """
    This returns a generator for task executions, given a node execution identifier
    :param flytekit.clients.friendly.SynchronousFlyteClient client:
    :param flytekit.models.core.identifier.NodeExecutionIdentifier node_execution_identifier:
    :param int limit: The maximum number of elements to retrieve
    :param list[flytekit.models.filters.Filter] filters:
    :rtype: Iterator[flytekit.models.admin.task_execution.TaskExecution]
    """
    token = ''
    num_to_fetch = 100
    if limit is not None and limit < num_to_fetch:
        num_to_fetch = limit
    counter = 0
    while True:
        task_execs, next_token = client.list_task_executions_paginated(
            node_execution_identifier=node_execution_identifier, limit=
            num_to_fetch, token=token, filters=filters)
        for t in task_execs:
            counter += 1
            if limit is not None and counter > limit:
                return
            yield t
        if not next_token:
            break
        token = next_token
