@@ -0,0 +1,1392 @@
+import logging%0Afrom functools import wraps%0A%0ALOGGER = logging.getLogger(__name__)%0A%0Adef print_stack(func):%0A    @wraps(func)%0A    def tmp(*args, **kwargs):%0A        print(func.__name__)%0A        return func(*args, **kwargs)%0A    return tmp%0A%0Adef print_caller_name(stack_size=3):%0A    def wrapper(fn):%0A        def inner(*args, **kwargs):%0A            import inspect%0A            stack = inspect.stack()%0A%0A            modules = %5B(index, inspect.getmodule(stack%5Bindex%5D%5B0%5D))%0A                       for index in reversed(range(1, stack_size))%5D%0A            module_name_lengths = %5Blen(module.__name__)%0A                                   for _, module in modules%5D%0A%0A            s = '%7Bindex:%3E5%7D : %7Bmodule:%5E%25i%7D : %7Bname%7D' %25 (max(module_name_lengths) + 4)%0A            callers = %5B'',%0A                       s.format(index='level', module='module', name='name'),%0A                       '-' * 50%5D%0A%0A            for index, module in modules:%0A                callers.append(s.format(index=index,%0A                                        module=module.__name__,%0A                                        name=stack%5Bindex%5D%5B3%5D))%0A%0A            callers.append(s.format(index=0,%0A                                    module=fn.__module__,%0A                                    name=fn.__name__))%0A            callers.append('')%0A            print('%5Cn'.join(callers))%0A%0A            fn(*args, **kwargs)%0A        return inner%0A    return wrapper

test function