human
Complete the below
def _AddListFieldsMethod(message_descriptor, cls):

    ''''Helper for _AddMessageMethods().'
    '''

=====
Write me a the Python code you requested?
assistant
#Here is the Python code you requested.
    def ListFields(self):
        all_fields = [item for item in self._fields.iteritems() if _IsPresent(item)]
        all_fields.sort(key=(lambda item: item[0].number))
        return all_fields
    cls.ListFields = ListFields