class_docstr: Organize Renderers for ``pyvista.Plotter``.
  
  Parameters
  ----------
  plotter : str
      The PyVista plotter.
  
  shape : tuple[int], optional
      The initial shape of the PyVista plotter, (rows, columns).
  
  splitting_position : float, optional
      The position to place the splitting line between plots.
  
  row_weights : sequence, optional
      The weights of the rows when the plot window is resized.
  
  col_weights : sequence, optional
      The weights of the columns when the plot window is resized.
  
  groups : list, optional
      A list of sequences that defines the grouping of the sub-datasets.
  
  border : bool, optional
      Whether or not a border should be added around each subplot.
  
  border_color : str, optional
      The color of the border around each subplot.
  
  border_width : float, optional
      The width of the border around each subplot.
class_docstr_tok: ["Organize","Renderers","for","``","pyvista.Plotter","``",".","Parameters","--","--","--","--","--","plotter",":","str","The","PyVista","plotter",".","shape",":","tuple","[","int","]",",","optional","The","initial","shape","of","the","PyVista","plotter",",","(","rows",",","columns",")",".","splitting_position",":","float",",","optional","The","position","to","place","the","splitting","line","between","plots",".","row_weights",":","sequence",",","optional","The","weights","of","the","rows","when","the","plot","window","is","resized",".","col_weights",":","sequence",",","optional","The","weights","of","the","columns","when","the","plot","window","is","resized",".","groups",":","list",",","optional","A","list","of","sequences","that","defines","the","grouping","of","the","sub-datasets",".","border",":","bool",",","optional","Whether","or","not","a","border","should","be","added","around","each","subplot",".","border_color",":","str",",","optional","The","color","of","the","border","around","each","subplot",".","border_width",":","float",",","optional","The","width","of","the","border","around","each","subplot","."]
docstr: Add a background image to the renderers.
  
  Parameters
  ----------
  image_path : str
      Path to an image file.
  
  scale : float
      Scale the image larger or smaller relative to the size of
      the window.  For example, a scale size of 2 will make the
      largest dimension of the image twice as large as the
      largest dimension of the render window.  Defaults to 1.
  
  as_global : bool
      When multiple render windows are present, setting
      ``as_global=False`` will cause the background to only
      appear in one window.
  
  Returns
  -------
  pyvista.BackgroundRenderer
      Newly created background renderer.
docstr_tok: ["Add","a","background","image","to","the","renderers",".","Parameters","--","--","--","--","--","image_path",":","str","Path","to","an","image","file",".","scale",":","float","Scale","the","image","larger","or","smaller","relative","to","the","size","of","the","window",".","For","example",",","a","scale","size","of","2","will","make","the","largest","dimension","of","the","image","twice","as","large","as","the","largest","dimension","of","the","render","window",".","Defaults","to","1.","as_global",":","bool","When","multiple","render","windows","are","present",",","setting","``","as_global=False","``","will","cause","the","background","to","only","appear","in","one","window",".","Returns","--","--","--","-","pyvista.BackgroundRenderer","Newly","created","background","renderer","."]
code: def add_background_renderer(self, image_path, scale, as_global):
      """Add a background image to the renderers.
  
      Parameters
      ----------
      image_path : str
          Path to an image file.
  
      scale : float
          Scale the image larger or smaller relative to the size of
          the window.  For example, a scale size of 2 will make the
          largest dimension of the image twice as large as the
          largest dimension of the render window.  Defaults to 1.
  
      as_global : bool
          When multiple render windows are present, setting
          ``as_global=False`` will cause the background to only
          appear in one window.
  
      Returns
      -------
      pyvista.BackgroundRenderer
          Newly created background renderer.
  
      """
      # verify no render exists
      if as_global:
          for renderer in self:
              renderer.layer = 2
          view_port = None
      else:
          self.active_renderer.layer = 2
          view_port = self.active_renderer.GetViewport()
  
      renderer = BackgroundRenderer(
          self._plotter, image_path, scale, view_port
      )
      renderer.layer = 1
      self._background_renderers[self.active_index] = renderer
      return renderer
  
imports: import collections
  from itertools import product
  from weakref import proxy
  import numpy
  import pyvista
  from .background_renderer import BackgroundRenderer
  from .renderer import Renderer
label_desc: Use image node_id 15 for calling the Renderers obj's underlying member method code with example usage: obj.add_background_renderer(image_path, scale, as_global) and returns: renderer