code: def as_operation(self):
          
          result = encoding.CopyProtoMessage(self._op)
          names = sorted(self._metric_values_by_name_then_sign.keys())
          for name in names:
              mvs = self._metric_values_by_name_then_sign[name]
              result.metricValueSets.append(
                  sc_messages.MetricValueSet(
                      metricName=name, metricValues=mvs.values()))
          return result
docs: Obtains a single `Operation` representing this instances contents.
  
          Returns:
             :class:`endpoints_management.gen.servicecontrol_v1_messages.Operation`