def _load_dotted(name):
    """
    Load a dotted name

    (Stolen from wtf-server)

    The dotted name can be anything, which is passively resolvable
    (i.e. without the invocation of a class to get their attributes or
    the like).

    :Parameters:
      `name` : ``str``
        The dotted name to load

    :Return: The loaded object
    :Rtype: any

    :Exceptions:
      - `ImportError` : A module in the path could not be loaded
    """
    components = name.split('.')
    path = [components.pop(0)]
    obj = __import__(path[0])
    while components:
        comp = components.pop(0)
        path.append(comp)
        try:
            obj = getattr(obj, comp)
        except AttributeError:
            __import__('.'.join(path))
            try:
                obj = getattr(obj, comp)
            except AttributeError:
                raise ImportError('.'.join(path))
    return obj