def ClearExtension(self, extension):
    from google.protobuf import descriptor
    if not isinstance(extension, descriptor.FieldDescriptor):
      raise KeyError('Bad extension %r.' % (extension,))
    self._cmsg.ClearFieldByDescriptor(extension._cdescriptor)
    if extension in self._values:
      del self._values[extension]
dataset/ETHPy150Open katharosada/botchallenge/client/google/protobuf/internal/cpp_message.py/ExtensionDict.ClearExtension/original