code: function (aggregate) {
      if (!aggregate || !(aggregate instanceof Aggregate)) {
        throw new Error('Passed object should be an Aggregate');
      }
  
      aggregate.defineContext(this);
  
      if (this.aggregates.indexOf(aggregate) < 0) {
        this.aggregates.push(aggregate);
      }
    }
docs: Adds an aggregate to this context.
  @param {Aggregate} aggregate the aggregate that should be added