docstr: Parse the Opencensus protobuf and store metrics.
  
  Metrics can be accessed via `metrics` API for proxy export.
  
  Args:
      metrics: A list of Opencensus protobuf for proxy export.
docstr_tok: ["Parse","the","Opencensus","protobuf","and","store","metrics",".","Metrics","can","be","accessed","via","`","metrics","`","API","for","proxy","export",".","Args",":","metrics",":","A","list","of","Opencensus","protobuf","for","proxy","export","."]
code: def record(self, metrics: List[Metric]):
      """Parse the Opencensus protobuf and store metrics.
  
      Metrics can be accessed via `metrics` API for proxy export.
  
      Args:
          metrics: A list of Opencensus protobuf for proxy export.
      """
      self._last_reported_time = time.monotonic()
      for metric in metrics:
          fix_grpc_metric(metric)
          descriptor = metric.metric_descriptor
          name = descriptor.name
          label_keys = [
              label_key.key for label_key in descriptor.label_keys
          ]
  
          if name not in self._metrics:
              self._metrics[name] = OpencensusProxyMetric(
                  name,
                  descriptor.description,
                  descriptor.unit,
                  label_keys,
              )
          self._metrics[name].record(metric)
  
imports: import json
  import logging
  import os
  import re
  import threading
  import time
  import traceback
  from collections import namedtuple
  from typing import List, Tuple, Any, Dict
  from prometheus_client.core import CounterMetricFamily, GaugeMetricFamily, HistogramMetricFamily
  from opencensus.metrics.export.value import ValueDouble
  from opencensus.stats import aggregation
  from opencensus.stats import measure
  from opencensus.stats.view_manager import ViewManager
  from opencensus.stats.stats_recorder import StatsRecorder
  from opencensus.stats.base_exporter import StatsExporter
  from prometheus_client.core import Metric
  from opencensus.stats.aggregation_data import CountAggregationData, DistributionAggregationData, LastValueAggregationData
  from opencensus.stats.view import View
  from opencensus.tags import tag_key
  from opencensus.tags import tag_map
  from opencensus.tags import tag_value
  import ray
  from ray._raylet import GcsClient
  from ray.core.generated.metrics_pb2 import Metric
label_desc: Use image node_id 4 for calling the Component obj's underlying member method code with example usage: obj.record(metrics) without return types