def resolve_name(name):
if '<STR_LIT::>' in name:<EOL><INDENT>name = '<STR_LIT>' % tuple(name.split('<STR_LIT::>'))<EOL><DEDENT>name = name.split('<STR_LIT:.>')<EOL>used = name.pop(<NUM_LIT:0>)<EOL>found = __import__(used)<EOL>for n in name:<EOL><INDENT>used = used + '<STR_LIT:.>' + n<EOL>try:<EOL><INDENT>found = getattr(found, n)<EOL><DEDENT>except AttributeError:<EOL><INDENT>__import__(used)<EOL>found = getattr(found, n)<EOL><DEDENT><DEDENT>return found<EOL>
Resolve a dotted name to some object (usually class, module, or function).

Supported naming formats include:
    1. path.to.module:method
    2. path.to.module.ClassName

>>> resolve_name('coilmq.store.memory.MemoryQueue')
<class 'coilmq.store.memory.MemoryQueue'>
>>> t = resolve_name('coilmq.store.dbm.make_dbm')
>>> import inspect
>>> inspect.isfunction(t)
True
>>> t.__name__
'make_dbm'

@param name: The dotted name (e.g. path.to.MyClass)
@type name: C{str}

@return: The resolved object (class, callable, etc.) or None if not found.