def METHOD_NAME(skip_empty: bool = False) -> Iterator[str]:
    """Read lines from stdin.
    Returns iterator of lines with any whitespace trimmed.
    skip_empty - when True whitespace only lines will be omitted
    """
    pred = {True: lambda s: len(s) > 0, False: lambda s: True}[skip_empty]
    for line in stdin:
        line = line.strip()
        if pred(line):
            yield line