code: def _sign_operation(op):
      
      md5 = hashlib.md5()
      md5.update(op.consumerId.encode('utf-8'))
      md5.update(b'\x00')
      md5.update(op.operationName.encode('utf-8'))
      if op.labels:
          signing.add_dict_to_hash(md5, encoding.MessageToPyValue(op.labels))
      return md5.digest()
docs: Obtains a signature for an operation in a ReportRequest.
  
      Args:
         op (:class:`endpoints_management.gen.servicecontrol_v1_messages.Operation`): an
           operation used in a `ReportRequest`
  
      Returns:
         string: a unique signature for that operation