class_docstr: Representation of a "namespace" that can be shared between
  different contexts. App backends can associate themselves with this
  object via add_ref().
  
  This object can be used to establish whether two contexts/canvases
  share objects, and can be used as a placeholder to store shared
  information, such as glyph atlasses.
class_docstr_tok: ["Representation","of","a","``","namespace","''","that","can","be","shared","between","different","contexts",".","App","backends","can","associate","themselves","with","this","object","via","add_ref","(",")",".","This","object","can","be","used","to","establish","whether","two","contexts\/canvases","share","objects",",","and","can","be","used","as","a","placeholder","to","store","shared","information",",","such","as","glyph","atlasses","."]
docstr: Add a reference for the backend object that gives access
  to the low level context. Used in vispy.app.canvas.backends.
  The given name must match with that of previously added
  references.
docstr_tok: ["Add","a","reference","for","the","backend","object","that","gives","access","to","the","low","level","context",".","Used","in","vispy.app.canvas.backends",".","The","given","name","must","match","with","that","of","previously","added","references","."]
code: def add_ref(self, name, ref):
      """Add a reference for the backend object that gives access
      to the low level context. Used in vispy.app.canvas.backends.
      The given name must match with that of previously added
      references.
      """
      if self._name is None:
          self._name = name
      elif name != self._name:
          raise RuntimeError(
              "Contexts can only share between backends of "
              "the same type"
          )
      self._refs.append(weakref.ref(ref))
  
imports: from copy import deepcopy
  import weakref
  from .glir import GlirQueue, BaseGlirParser, GlirParser, glir_logger
  from .wrappers import BaseGlooFunctions
  from ..None import config
label_desc: Use image node_id 5 for calling the GLShared obj's underlying member method code with example usage: obj.add_ref(name, ref) without return types