previousContext() {
    const contexts = Array.isArray(this.server_contexts) ? this.server_contexts : this.contexts;
    const pos = contexts.indexOf(this.current_context);
    const prev = pos === 0 ? contexts.length - 1 : pos - 1;
    this.current_context = contexts[prev];
  }
Switches the current_context to the previous one in the array of contexts