Question about EIP-137 (Ethereum Name Service)

1M Ago
I am trying to build the namehash() algorithm in python for []( A screenshot of the algorithm is below. I'm able to get the keccak/sha3 of a specific labelHash (like 'vitalik' and 'eth' for example). However, I can't for the life of me figure out how to do this recursively. I have tried about every way of adding the 2 hashes together and then hashing again with no luck. Basically, where it says >the previous output is concatenated with the label hash and hashed again Does anyone have any tips to do this, or better yet, a working python namehash function?