a = [['hdisk37', '00f7e0b88577106a']]
b = [['1', '00f7e0b8cee02cd6'], ['2', '00f7e0b88577106a']]

def combine(*lols):
    ret = collections.defaultdict(set)
for lol in lols:
    for l in lol:
        ret[l[1]].add(l[1])
ret[l[1]].add(l[0])
return {k: list(v) for k, v in list(ret.items())}
print(combine(a, b))
Matching and Combining Multiple 2D lists in Python