human
Complete this python program:
def count_calls(fn):
assistant
#Here is the Python code you requested.

    """Decorator to track the number of times a function is called.
    :param fn: the function to be decorated
    :type fn: C{func}
    :return: the decorated function
    :rtype: C{func}
    """
    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        counter(('%s_calls' % get_qualname(fn))).inc()
        return fn(*args, **kwargs)
    return wrapper