Code for tree morphology graphs