docs: protected static void setMetaClass(final MetaClass metaClass, Class nodeClass) {
          // TODO Is protected static a bit of a smell?
          // TODO perhaps set nodeClass to be Class<? extends Node>
          final MetaClass newMetaClass = new DelegatingMetaClass(metaClass) {
              @Override
              public Object getAttribute(final Object object, final String attribute) {
                  Node n = (Node) object;
                  return n.get("@" + attribute);
              }
  
              @Override
              public void setAttribute(final Object object, final String attribute, final Object newValue) {
                  Node n = (Node) object;
                  n.attributes().put(attribute, newValue);
              }
  
              @Override
              public Object getProperty(Object object, String property) {
                  if (object instanceof Node) {
                      Node n = (Node) object;
                      return n.get(property);
                  }
                  return super.getProperty(object, property);
              }
  
              @Override
              public void setProperty(Object object, String property, Object newValue) {
                  if (property.startsWith("@")) {
                      setAttribute(object, property.substring(1), newValue);
                      return;
                  }
                  delegate.setProperty(object, property, newValue);
              }
  
          };
          GroovySystem.getMetaClassRegistry().setMetaClass(nodeClass, newMetaClass);
      }