def parse_show_isis_ldp_sync(lines, rname):
    """
    Parse the output of 'show isis mpls ldp sync' into a Python dict.
    """
    interfaces = {}

    it = iter(lines)

    while True:
        try:
            interface = {}
            interface_name = None

            line = next(it)

            if line.startswith(rname + "-eth"):
                interface_name = line

            line = next(it)

            if line.startswith(" LDP-IGP Synchronization enabled: "):
                interface["ldpIgpSyncEnabled"] = line.endswith("yes")
                line = next(it)

                if line.startswith(" holddown timer in seconds: "):
                    interface["holdDownTimeInSec"] = int(line.split(": ")[-1])
                    line = next(it)

                if line.startswith(" State: "):
                    interface["ldpIgpSyncState"] = line.split(": ")[-1]

            elif line.startswith(" Interface "):
                interface["Interface"] = line.endswith("down")

            interfaces[interface_name] = interface

        except StopIteration:
            break

    return interfaces