parameters: (message, extension_handle)
docstring: Verify that the given extension handle is valid.
docstring_summary: Verify that the given extension handle is valid.
docstring_tokens: Verify that the given extension handle is valid .
function: def _VerifyExtensionHandle(message, extension_handle):
    """Verify that the given extension handle is valid."""
  
    if not isinstance(extension_handle, _FieldDescriptor):
      raise KeyError('HasExtension() expects an extension handle, got: %s' %
                     extension_handle)
  
    if not extension_handle.is_extension:
      raise KeyError('"%s" is not an extension.' % extension_handle.full_name)
  
    if extension_handle.containing_type is not message.DESCRIPTOR:
      raise KeyError('Extension "%s" extends message type "%s", but this '
                     'message is of type "%s".' %
                     (extension_handle.full_name,
                      extension_handle.containing_type.full_name,
                      message.DESCRIPTOR.full_name))
function_tokens: def _VerifyExtensionHandle ( message , extension_handle ) : if not isinstance ( extension_handle , _FieldDescriptor ) : raise KeyError ( 'HasExtension() expects an extension handle, got: %s' % extension_handle ) if not extension_handle . is_extension : raise KeyError ( '"%s" is not an extension.' % extension_handle . full_name ) if extension_handle . containing_type is not message . DESCRIPTOR : raise KeyError ( 'Extension "%s" extends message type "%s", but this ' 'message is of type "%s".' % ( extension_handle . full_name , extension_handle . containing_type . full_name , message . DESCRIPTOR . full_name ) )