Finds all instances of instance in tree

        :param instance: type of object
        :return: list of objects in tree of same instance

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)
        ]