returns all the parent sprites up until scene

def get_parents(self):
        """returns all the parent sprites up until scene"""
        res = []
        parent = self.parent
        while parent and isinstance(parent, Scene) == False:
            res.insert(0, parent)
            parent = parent.parent

        return res