<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _earlystop_notify_tuner(self, data):
 """Send last intermediate result as final result to tuner in case the trial is early stopped. """

        _logger.debug('Early stop notify tuner data: [%s]', data)
        data['type'] = 'FINAL'
        if multi_thread_enabled():
            self._handle_final_metric_data(data)
        else:
            self.enqueue_command(CommandType.ReportMetricData, data)