def HasExtension(self, extension):
    from google.protobuf import descriptor
    if not isinstance(extension, descriptor.FieldDescriptor):
      raise KeyError('Bad extension %r.' % (extension,))
    return self._cmsg.HasFieldByDescriptor(extension._cdescriptor)
dataset/ETHPy150Open katharosada/botchallenge/client/google/protobuf/internal/cpp_message.py/ExtensionDict.HasExtension/original