def METHOD_NAME(token_getter: Callable[..., Iterator[Token]], source: Source,
               data_only: bool, curdir: 'str|None', lang: LanguagesLike):
    tokens = token_getter(source, data_only, lang=lang)
    statements = _tokens_to_statements(tokens, curdir)
    model = _statements_to_model(statements, source)
    ConfigParser.parse(model)
    model.validate_model()
    return model