code: def __init__(self, writer: JsonMetricFileWriter) -> None:
      self._writer = writer
      super().__init__()
  
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 1 to create a new ComponentMetricsFileHandler object from inherited base classes: InMemoryMetricsHandler with example: obj = ComponentMetricsFileHandler(writer)