code: def get_metric_descriptor(self, oc_md):
          
          try:
              metric_kind, value_type = OC_MD_TO_SD_TYPE[oc_md.type]
          except KeyError:
              raise TypeError("Unsupported metric type: {}".format(oc_md.type))
  
          if self.options.metric_prefix:
              display_name_prefix = self.options.metric_prefix
          else:
              display_name_prefix = DEFAULT_DISPLAY_NAME_PREFIX
  
          desc_labels = new_label_descriptors(
              self.options.default_monitoring_labels, oc_md.label_keys)
  
          descriptor = monitoring_v3.types.MetricDescriptor(labels=desc_labels)
          metric_type = self.get_metric_type(oc_md)
          descriptor.type = metric_type
          descriptor.metric_kind = metric_kind
          descriptor.value_type = value_type
          descriptor.description = oc_md.description
          descriptor.unit = oc_md.unit
          descriptor.name = ("projects/{}/metricDescriptors/{}"
                             .format(self.options.project_id, metric_type))
          descriptor.display_name = ("{}/{}"
                                     .format(display_name_prefix, oc_md.name))
  
          return descriptor
docs: Convert an OC metric descriptor to a SD metric descriptor.