def METHOD_NAME(self, sys_event):
    self.device_realtime_stats_event = sys_event
    mqtt_mgr = MqttManager(
        self.args.mqtt_config_path["BROKER_HOST"],
        self.args.mqtt_config_path["BROKER_PORT"],
        self.args.mqtt_config_path["MQTT_USER"],
        self.args.mqtt_config_path["MQTT_PWD"],
        180,
        "FedML_Metrics_DevicePerf_{}_{}_{}".format(str(self.args.device_id), str(self.edge_id), str(uuid.uuid4()))
    )
    mqtt_mgr.connect()
    mqtt_mgr.loop_start()
    parent_pid = psutil.Process(os.getpid()).ppid()
    sys_stats_obj = SysStats(process_id=parent_pid)
    # Notify MLOps with system information.
    while not self.should_stop_device_realtime_stats():
        try:
            MLOpsDevicePerfStats.report_gpu_device_info(self.edge_id, mqtt_mgr=mqtt_mgr)
        except Exception as e:
            logging.debug("exception when reporting device pref: {}.".format(traceback.format_exc()))
            pass
        time.sleep(10)
    logging.info("Device metrics process is about to exit.")
    mqtt_mgr.loop_stop()
    mqtt_mgr.disconnect()