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: Overrides `str.__getattribute__` in a way that causes all
  inherited `str` methods to return a `HypertoolsBackend`
  instance, rather than a `str`, which it would otherwise do.
  See class docstring for more information.
  
  Parameters
  ----------
  name : the attribute or method accessed
  
  Returns
  -------
  val : instance (or collection of instances) of
      `hypertools.plot.backend.HypertoolsBackend`. For inherited
      `str` attributes and methods, the return type is the same,
      but with all instances of `str` replaced with
      `hypertools.plot.backend.HypertoolsBackend`.
code: def __getattribute__(self, name):
      """
      Overrides `str.__getattribute__` in a way that causes all
      inherited `str` methods to return a `HypertoolsBackend`
      instance, rather than a `str`, which it would otherwise do.
      See class docstring for more information.
  
      Parameters
      ----------
      name : the attribute or method accessed
  
      Returns
      -------
      val : instance (or collection of instances) of
          `hypertools.plot.backend.HypertoolsBackend`. For inherited
          `str` attributes and methods, the return type is the same,
          but with all instances of `str` replaced with
          `hypertools.plot.backend.HypertoolsBackend`.
      """
      # only deal with string attributes/methods here
      if hasattr(str, name):
  
          def _subclass_method(self, *args, **kwargs):
              value = getattr(super(), name)(*args, **kwargs)
              if isinstance(value, str):
                  return HypertoolsBackend(value)
              elif isinstance(value, (list, tuple, set)):
                  return type(value)(
                      HypertoolsBackend(v) for v in value
                  )
              else:
                  return value
  
          # bind inner function to instance
          return _subclass_method.__get__(self)
      else:
          return super().__getattribute__(name)
  
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 3 for calling the HypertoolsBackend obj's underlying member method code with example usage: obj.__getattribute__(name) and returns: _subclass_method, super, HypertoolsBackend, type, value