code: def parse_lines(path: str, line_iter: list[str]) -> list[_ParsedLine]:
      result: list[_ParsedLine] = []
      section = None
      for lineno, line in enumerate(line_iter):
          name, data = _parseline(path, line, lineno)
          # new value
          if name is not None and data is not None:
              result.append(_ParsedLine(lineno, section, name, data))
          # new section
          elif name is not None and data is None:
              if not name:
                  raise ParseError(path, lineno, "empty section name")
              section = name
              result.append(_ParsedLine(lineno, section, None, None))
          # continuation
          elif name is None and data is not None:
              if not result:
                  raise ParseError(
                      path, lineno, "unexpected value continuation"
                  )
              last = result.pop()
              if last.name is None:
                  raise ParseError(
                      path, lineno, "unexpected value continuation"
                  )
  
              if last.value:
                  last = last._replace(value=f"{last.value}\n{data}")
              else:
                  last = last._replace(value=data)
              result.append(last)
      return result
  
file_path: catboost/contrib/python/iniconfig/iniconfig/_parse.py
imports: from __future__ import annotations
  from .exceptions import ParseError
  from typing import NamedTuple
label_desc: Use image node_id 1 for calling a global function with example usage: parse_lines(path, line_iter) and returns: result