def deptree(self, things, recursive, **kwargs):

        def treehelper(service, indent, shown):
            deps = sorted(service.dependencies) if recursive \
                else sorted(service.dependencies.difference(shown))
            shown.update(deps)
            for i, dep in enumerate(deps, 1):
                last = i == len(deps)
                print('{}{} {}'.format(indent,
                                       last and '\\-' or '+-',
                                       dep.name))
                treehelper(dep, indent + (last and '  ' or '|  '), shown)

        services = self._to_services(things or sorted(self.services))
        for i, service in enumerate(services, 1):
            print(service.name)
            treehelper(service, ' ', set([]))
            if i < len(services):
                print()
Display the dependency tree of the given services.
dataset/ETHPy150Open signalfx/maestro-ng/maestro/maestro.py/Conductor.deptree