code: def unregister(self, alias):
          
          if alias not in self._service_objects:
              raise Error(self._device,
                          'No service is registered with alias "%s".' % alias)
          service_obj = self._service_objects.pop(alias)
          if service_obj.is_alive:
              with expects.expect_no_raises(
                      'Failed to stop service instance "%s".' % alias):
                  service_obj.stop()
docs: Unregisters a service instance.
  
          Stops a service and removes it from the manager.
  
          Args:
              alias: string, the alias of the service instance to unregister.