def METHOD_NAME(filename: Path) -> Set[str]:
    regex = r"\$\{(\w+)\}"
    result = set()
    with open(filename) as f:
        for line in f.readlines():
            if line.strip().startswith("#"):
                continue
            for match in re.finditer(regex, line):
                result.add(match.group(1))
    return result