from pkg_resources import EntryPoint


def resolveDotted(dotted_or_ep):
    """ Resolve a dotted name or setuptools entry point to a callable.
    """
    return EntryPoint.parse('x=%s' % dotted_or_ep).resolve()