code: def getWidget(self,**kwargs):
          
          from .widget import Widget # ondemand
          from ipywidgets import DOMWidget
          from IPython.display import display, HTML
          if not hasattr(self, '_widgets'):
              self._widgets = []
              def display_heartbeat(simp):
                  for w in self._widgets:
                      w.refresh(simp,isauto=1)
              self.visualization = VISUALIZATIONS["webgl"] 
              clibrebound.reb_display_init_data(byref(self));
              self._dhbf = AFF(display_heartbeat)
              self._display_heartbeat = self._dhbf
              display(HTML(Widget.getClientCode())) # HACK! Javascript should go into custom.js
          newWidget = Widget(self,**kwargs)
          self._widgets.append(newWidget)
          newWidget.refresh(isauto=0)
          return newWidget
docs: Wrapper function that returns a new widget attached to this simulation.
  
          Widgets provide real-time 3D visualizations from within an Jupyter notebook.
          See the Widget class for more details on the possible arguments.
          
          
          Arguments
          ---------
          All arguments passed to this wrapper function will be passed to /Widget class.
          
          Returns
          ------- 
          A rebound.Widget object.
          
          Examples
          --------
  
          >>> sim = rebound.Simulation()
          >>> sim.add(m=1.)
          >>> sim.add(m=1.e-3,x=1.,vy=1.)
          >>> sim.getWidget()