Helpers for tree-like data structures useful for creating simple languages and type systems in Python