def _handle_stats_opt_in(self, settings_data=None):
        must_send = self.single.must_send_stats(
            master_node_settings_data=settings_data)
        if must_send:
            logger.debug("Handling customer opt-in to sending statistics")
            manager = CreateStatsUserTaskManager()
        else:
            logger.debug("Handling customer opt-out to sending statistics")
            manager = RemoveStatsUserTaskManager()
        try:
            manager.execute()
        except Exception:
            logger.exception("Stats user operation failed")
Train a keras model on a worker and send asynchronous updates
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/api/v1/handlers/master_node_settings.py/MasterNodeSettingsHandler._handle_stats_opt_in--crossover with--dataset/ETHPy150Open maxpumperla/elephas/elephas/spark_model.py/AsynchronousSparkWorker.train