def decorator(caller, _func=None):
if _func is not None:  <EOL><INDENT>return decorate(_func, caller)<EOL><DEDENT>if inspect.isclass(caller):<EOL><INDENT>name = caller.__name__.lower()<EOL>doc = '<STR_LIT>''<STR_LIT>' % (caller.__name__, caller.__name__)<EOL><DEDENT>elif inspect.isfunction(caller):<EOL><INDENT>if caller.__name__ == '<STR_LIT>':<EOL><INDENT>name = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>name = caller.__name__<EOL><DEDENT>doc = caller.__doc__<EOL><DEDENT>else:  <EOL><INDENT>name = caller.__class__.__name__.lower()<EOL>doc = caller.__call__.__doc__<EOL><DEDENT>evaldict = dict(_call_=caller, _decorate_=decorate)<EOL>return FunctionMaker.create(<EOL>'<STR_LIT>' % name, '<STR_LIT>',<EOL>evaldict, doc=doc, module=caller.__module__,<EOL>__wrapped__=caller)<EOL>
decorator(caller) converts a caller function into a decorator