def __generator(x):
    for line in x:
        line = line.strip()
        if not line or line[0] in '#.[':
            continue
        fields = line.split()
        if len(fields) == 1:
            yield((fields[0], fields[0], None))
        else:
            # Make the label be the first N-1 fields, and the hostname/IP be the last
            yield ((' '.join(fields[0:-1]), fields[-1], None))
dataset/ETHPy150Open radssh/radssh/radssh/core_plugins/file_lookup.py/__generator/original