docstr: Parse the Opencensus Protobuf and store the data.
  
  The data can be accessed via `data` API once recorded.
docstr_tok: ["Parse","the","Opencensus","Protobuf","and","store","the","data",".","The","data","can","be","accessed","via","`","data","`","API","once","recorded","."]
code: def record(self, metric: Metric):
      """Parse the Opencensus Protobuf and store the data.
  
      The data can be accessed via `data` API once recorded.
      """
      timeseries = metric.timeseries
  
      if len(timeseries) == 0:
          return
  
      # Create the aggregation and fill it in the our stats
      for series in timeseries:
          labels = tuple(val.value for val in series.label_values)
  
          # Aggregate points.
          for point in series.points:
              if point.HasField("int64_value"):
                  data = CountAggregationData(point.int64_value)
              elif point.HasField("double_value"):
                  data = LastValueAggregationData(
                      ValueDouble, point.double_value
                  )
              elif point.HasField("distribution_value"):
                  dist_value = point.distribution_value
                  counts_per_bucket = [
                      bucket.count for bucket in dist_value.buckets
                  ]
                  bucket_bounds = (
                      dist_value.bucket_options.explicit.bounds
                  )
                  data = DistributionAggregationData(
                      dist_value.sum / dist_value.count,
                      dist_value.count,
                      dist_value.sum_of_squared_deviation,
                      counts_per_bucket,
                      bucket_bounds,
                  )
              else:
                  raise ValueError("Summary is not supported")
              self._data[labels] = data
  
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 7 for calling the OpencensusProxyMetric obj's underlying member method code with example usage: obj.record(metric) without return types