A graph language from SICP, 2.2.4, implemented in Python