def decorator_with_introspection(func):
    def decorator(function):
        def double_wrapper(*args):
            return function(*args) * 2
        return double_wrapper

    def function_with_a_name(a, b, c, d):
        # insert comment here
        return a + b + c + d

    wrapped = func(function_with_a_name, decorator)
    assertEqual(wrapped(1, 2, 3, 4), 20)
    assertEqual(wrapped.__name__, "function_with_a_name")
    assertEqual(wrapped.func_code.co_argcount, 4)
    assertIn("# insert comment here", inspect.getsource(wrapped))
Attempts to convert an object to a time (of day).
dataset/ETHPy150Open alexmojaki/funcfinder/funcfinder/questions/decorator.py/decorator_with_introspection--crossover with--dataset/ETHPy150Open twosigma/ngrid/ngrid/datetime.py/ensure_time