def get_iterator_from_config(config: dict, data: dict):
    """Create iterator (from config) for specified data."""
    iterator_config = {k: resolve(v) for k, v in config['dataset_iterator'].items()}
    iterator: Union[DataLearningIterator, DataFittingIterator] = get_model(iterator_config.pop('class_name'))(
        **iterator_config, data=data)
    return iterator
Create iterator (from config) for specified data.
deeppavlov/core/commands/train.py