human
Complete the below
def echo(fn, write=sys.stdout.write):

    ''''Echo calls to a function.
    Returns a decorated version of the input function which "echoes" calls
    made to it by writing out the function\'s name and the arguments it was
    called with.'
    '''

Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    import functools
    code = fn.__code__
    argcount = code.co_argcount
    argnames = code.co_varnames[:argcount]
    fn_defaults = (fn.__defaults__ or list())
    argdefs = dict(list(zip(argnames[(- len(fn_defaults)):], fn_defaults)))
    @functools.wraps(fn)
    def wrapped(*v, **k):
        positional = list(map(format_arg_value, list(zip(argnames, v))))
        defaulted = [format_arg_value((a, argdefs[a])) for a in argnames[len(v):] if (a not in k)]
        nameless = list(map(repr, v[argcount:]))
        keyword = list(map(format_arg_value, list(k.items())))
        args = (((positional + defaulted) + nameless) + keyword)
        write(('%s(%s)\n' % (name(fn), ',    '.join(args))))
        return fn(*v, **k)
    return wrapped