getInstance<T> (key: string, getValueIfUndefined: () => T): T {
    if (!this.map[key]) {
      this.map[key] = getValueIfUndefined()
    }
    return this.map[key]