code: function(events) {
          const self = this;
          events.forEach(function(event) {
              self.accountData[event.getType()] = event;
          });
      }
docs: Store user-scoped account data events.
  N.B. that account data only allows a single event per type, so multiple
  events with the same type will replace each other.
  @param {Array<MatrixEvent>} events The events to store.