from pathlib import Path


def _lines_to_set(path):
    """
    Converts lines from the file in the specified path to set of strings
    which are lines in the file. Returns empty set when file doesn't exist.
    """
    out = set()
    if Path(path).is_file():
        with open(path) as f:
            out = set(f.read().splitlines())
    return out