code: def finalize(self):
      self._writer.write(self.get_metrics())
  
file_path: FATE/python/fate/components/core/component_desc/_metric.py
imports: from fate.arch.context._metrics import BaseMetricsHandler, InMemoryMetricsHandler, OneTimeMetrics, StepMetrics
  from .artifacts.metric import JsonMetricFileWriter, JsonMetricRestfulWriter
label_desc: Use image node_id 2 for calling the ComponentMetricsFileHandler obj's underlying member method code with example usage: obj.finalize() without return types