<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_fields(self):
 """Get all fields"""

        if not hasattr(self, '__fields'):
            self.__fields = [
                self.parse_field(field, index)
                for index, field in enumerate(getattr(self, 'fields', []))
            ]
        return self.__fields