def line_iterator_to_intermediary(line_iterator):
    current_table = None
    tables = []
    relations = []
    errors = []
    for line_nb, line, raw_line in filter_lines_from_comments(line_iterator):
        try:
            new_obj = parse_line(line)
            current_table, tables, relations = update_models(new_obj, current_table, tables, relations)
        except ParsingException as e:
            e.line_nb = line_nb
            e.line = raw_line
            errors.append(e)
    if len(errors) != 0:
        msg = 'ERAlchemy couldn\'t complete the generation due the {} following errors'.format(len(errors))
        raise ParsingException(msg + '\n\n'.join(e.traceback for e in errors))
    return tables, relations
Ensure that valid values return the expected validated data.
dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/parser.py/line_iterator_to_intermediary--crossover with--dataset/ETHPy150Open Hipo/drf-extra-fields/tests/test_fields.py/FieldValues.test_valid_inputs