<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def genealogic_types(self):
 """ Get genealogic types Returns: Returns a list of all parent types """


        types = []
        parent = self

        while parent:
            types.append(parent.rest_name)
            parent = parent.parent_object

        return types