<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_instances(self, instance):
 """Finds all instances of instance in tree :param instance: type of object :return: list of objects in tree of same instance """


        return [
            x
            for x in self.tree.body
            if isinstance(x, instance)
        ]