class_docstr: A subclass of the `str` built-in, intended for easy(ish...)
  conversion between the different valid matplotlib backend keys in
  Python vs IPython and equality/membership checks.
  
  Notes
  -----
  Normally, a lot of this could be simplified and a lot of grief saved
  by subclassing `collections.UserString` rather than `str` directly.
  The issue is that these objects get passed to a ton of different
  low-level `matplotlib`/`ipython`/`ipykernel`/etc. functions that
  expect to be receiving strings, and subclasses of `UserString` fail
  type-checks for **actual** strings (i.e.,
  `isinstance(UserStringSubclass('a'), str)` returns False) while
  this approach doesn't. Since it's impossible to trace through every
  possible function these could be forwarded to in every possible
  scenario (and any of those functions could be changed at any time),
  this will hopefully be more stable long-term.
class_docstr_tok: ["A","subclass","of","the","`","str","`","built-in",",","intended","for","easy","(","ish","...",")","conversion","between","the","different","valid","matplotlib","backend","keys","in","Python","vs","IPython","and","equality\/membership","checks",".","Notes","--","--","-","Normally",",","a","lot","of","this","could","be","simplified","and","a","lot","of","grief","saved","by","subclassing","`","collections.UserString","`","rather","than","`","str","`","directly",".","The","issue","is","that","these","objects","get","passed","to","a","ton","of","different","low-level","`","matplotlib","`","\/","`","ipython","`","\/","`","ipykernel","`","\/etc",".","functions","that","expect","to","be","receiving","strings",",","and","subclasses","of","`","UserString","`","fail","type-checks","for","*","*","actual","*","*","strings","(","i.e.",",","`","isinstance","(","UserStringSubclass","(","'","a","'",")",",","str",")","`","returns","False",")","while","this","approach","does","n't",".","Since","it","'s","impossible","to","trace","through","every","possible","function","these","could","be","forwarded","to","in","every","possible","scenario","(","and","any","of","those","functions","could","be","changed","at","any","time",")",",","this","will","hopefully","be","more","stable","long-term","."]
docstr: Return the IPython-compatible version of a matplotlib backend
  key, given either the Python-compatible or IPython-compatible
  version
code: def as_ipython(self):
      """
      Return the IPython-compatible version of a matplotlib backend
      key, given either the Python-compatible or IPython-compatible
      version
      """
      default_key = BACKEND_MAPPING.equivalents[self]
      return HypertoolsBackend(BACKEND_MAPPING.py_to_ipy[default_key])
  
imports: import inspect
  import sys
  import traceback
  import warnings
  from contextlib import contextmanager, redirect_stdout
  from functools import wraps
  from io import StringIO
  from os import getenv
  from typing import Iterable
  import matplotlib
  import matplotlib.pyplot
  from .._shared.exceptions import HypertoolsBackendError
label_desc: Use image node_id 5 for calling the HypertoolsBackend obj's underlying member method code with example usage: obj.as_ipython() and returns: HypertoolsBackend