docs: function create_scope(base, klass, id) {
      var const_alloc   = function() {};
      var const_scope   = const_alloc.prototype = new base.constructor();
      klass._scope      = const_scope;
      const_scope.base  = klass;
      klass._base_module = base.base;
      const_scope.constructor = const_alloc;
      const_scope.constants = [];
  
      if (id) {
        klass._orig_scope = base;
        base[id] = base.constructor[id] = klass;
        base.constants.push(id);
      }
    }