human
Here's a good function header given the following:
I wrote the below code

    def HasExtension(self, extension_handle):
        _VerifyExtensionHandle(self, extension_handle)
        if (extension_handle.label == _FieldDescriptor.LABEL_REPEATED):
            raise KeyError(('"%s"    is    repeated.' % extension_handle.full_name))
        if (extension_handle.cpp_type == _FieldDescriptor.CPPTYPE_MESSAGE):
            value = self._fields.get(extension_handle)
            return ((value is not None) and value._is_present_in_parent)
        else:
            return (extension_handle in self._fields)
    cls.HasExtension = HasExtension

What's a good function header?
assistant
#Here's a good function header.

def _AddHasExtensionMethod(cls):