def _class_dump(cls):
    """ Returns the hierarchy explanation of known classes

            Only designed for debugging purposes.
            It will return a dict of lists of tuples like::

                { '*': [ (module, name), (module, name), (module, name) ] }

            where '*' is the `_name` of the service,  `name` the name of the class 
            and `module` the name of the module the class is defined at.
            The order of the list is parent-to-baseclass.

            If called against the service baseclass, the dict will contain all known
            _names of services. Otherwise, it will only return the service of the
            class it was called against.
        """
    svc_name = None
    svc_classes = getattr(cls, '__service_classes', None)
    if svc_classes is None:
        svc_name = cls.getattr('_name', '*')
        for b in cls.__mro__:
            svc_classes = getattr(b, '__service_classes', None)
            if svc_classes is not None:
                break
    if svc_classes is None:
        raise RuntimeError('No base service class for %s.%s' % (cls.
            __module__, cls.__name__))
    ret = {}
    for sname, klass in svc_classes.items():
        if svc_name is not None and sname != svc_name:
            continue
        kret = ret[sname] = []
        for sm in klass.__mro__:
            if sm is object:
                break
            kret.append((sm.__module__, sm.__name__))
    return ret
