def METHOD_NAME(self, toplevel=None, items=[], max_depth=-1,
                    extra_info=None):
    widget = TreeItemItem(self, extra_info=extra_info)
    items.append(self.name)
    if max_depth < 0 or max_depth > 1:
        for item, start_time, end_time, cond, enabled in self.schedule:
            if item in self.experiment.items:
                self.experiment.items[item].METHOD_NAME(
                    widget, items, max_depth=max_depth-1, extra_info=cond)
                child = widget.child(widget.childCount()-1)
                if enabled:
                    child.setText(2, safe_decode(start_time))
                    if not self.is_oneshot_coroutine(item):
                        child.setText(3, safe_decode(end_time))
                else:
                    child.setDisabled(True)
                    child.setText(1, None)
                    child.setText(2, None)
                    child.setText(3, None)
    if toplevel is not None:
        toplevel.addChild(widget)
    else:
        widget.set_draggable(False)
    return widget