A collection of useful functions when working with PyTrees. Some of them are copied from deepmind/acme but having acme felt like a heavy dependency for these few lines of code..