code: def _extract_labels(time_series):
      
      labels = {"resource_type": time_series.resource.type}
      labels.update(time_series.resource.labels)
      labels.update(time_series.metric.labels)
      return labels
docs: Build the combined resource and metric labels, with resource_type.