def parse_internals(lines):
    """
    Takes a list of output lines from the "internals" command
    and turns it into a host indexed dictionary
    """
    internals = {}
    key = None
    for line in lines:
        if line.startswith('Node'):
            key = line.split()[2]
            internals[key] = []
            continue
        elif not key:
            continue
        args = line.split(':', 1)
        if len(args) != 2:
            args = line.split('=', 1)
        if len(args) != 2:
            continue
        internals[key].append((args[0].strip(), args[1].strip()))
    return internals
