nextContext() {
    const contexts = Array.isArray(this.server_contexts) ? this.server_contexts : this.contexts;
    const pos = contexts.indexOf(this.current_context);
    const next = (pos + 1) % contexts.length;
    this.current_context = contexts[next];
  }
Switches the current_context to the next one in the array of contexts