def obj_for_name(obj_name):
parts = obj_name.split('<STR_LIT:.>')<EOL>module = "<STR_LIT:.>".join(parts[:-<NUM_LIT:1>])<EOL>m = __import__( module )<EOL>for comp in parts[<NUM_LIT:1>:]:<EOL><INDENT>m = getattr(m, comp)<EOL><DEDENT>return m<EOL>
Instantiate class or function
:param obj_name: class or function name
:return: instance of class or function