<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_tree(self, root, maxdepth):
 """Workhorse of the get_tree implementation. This is an recursive method which is why we have a wrapper method. root is the current root object of the tree which should be returned. Note that root is not of the type _Node. maxdepth defines how much further down the from the root the tree should be build. """

        self.ignore.append(inspect.currentframe())
        res = _Node(root, self.str_func) #PYCHOK use root parameter
        self.already_included.add(id(root)) #PYCHOK use root parameter
        if maxdepth == 0:
            return res
        objects = gc.get_referrers(root) #PYCHOK use root parameter
        self.ignore.append(objects)
        for o in objects:
            # XXX: find a better way to ignore dict of _Node objects
            if isinstance(o, dict):
                sampleNode = _Node(1)
                if list(sampleNode.__dict__.keys()) == list(o.keys()):
                    continue
            _id = id(o)
            if not self.repeat and (_id in self.already_included):
                s = self.str_func(o)
                res.children.append("%s (already included, id %s)" %\
                                    (s, _id))
                continue
            if (not isinstance(o, _Node)) and (o not in self.ignore):
                res.children.append(self._get_tree(o, maxdepth-1))
        return res