code: def add_periodic_callback(self, callback, period_milliseconds):
          ''' Add a callback to be invoked on a session periodically.
  
          Args:
              callback (callable) :
                  A callback function to execute periodically
  
              period_milliseconds (int) :
                  Number of milliseconds between each callback execution.
  
          Returns:
              PeriodicCallback : can be used with ``remove_periodic_callback``
  
          .. note::
              Periodic callbacks only work within the context of a Bokeh server
              session. This function will no effect when Bokeh outputs to
              standalone HTML or Jupyter notebook cells.
  
          '''
          from ..server.callbacks import PeriodicCallback
          cb = PeriodicCallback(self,
                                None,
                                period_milliseconds)
          return self._add_session_callback(cb, callback, one_shot=False, originator=self.add_periodic_callbackf add_periodic_callback(self, callback, period_milliseconds):
          ''' Add a callback to be invoked on a session periodically.
  
          Args:
              callback (callable) :
                  A callback function to execute periodically
  
              period_milliseconds (int) :
                  Number of milliseconds between each callback execution.
  
          Returns:
              PeriodicCallback : can be used with ``remove_periodic_callback``
  
          .. note::
              Periodic callbacks only work within the context of a Bokeh server
              session. This function will no effect when Bokeh outputs to
              standalone HTML or Jupyter notebook cells.
  
          '''
          from ..server.callbacks import PeriodicCallback
          cb = PeriodicCallback(self,
                                None,
                                period_milliseconds)
          return self._add_session_callback(cb, callback, one_shot=False, originator=self.add_periodic_callback)
docs: Add a callback to be invoked on a session periodically.
  
          Args:
              callback (callable) :
                  A callback function to execute periodically
  
              period_milliseconds (int) :
                  Number of milliseconds between each callback execution.
  
          Returns:
              PeriodicCallback : can be used with ``remove_periodic_callback``
  
          .. note::
              Periodic callbacks only work within the context of a Bokeh server
              session. This function will no effect when Bokeh outputs to
              standalone HTML or Jupyter notebook cells.