code: def restart(self, wait=True, timeout=None, wait_polling_interval=None):
          
          self.stop(timeout=timeout)
          self.start(wait, timeout=timeout, wait_polling_interval=wait_polling_interval)
docs: Restart b2g, waiting for the adb connection to become stable.
  
          :param timeout: Maximum time to wait for restart.
          :param wait_polling_interval: Interval at which to poll for device readiness.