<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_calls_with_dims(**dims):
 """Decorator to track the number of times a function is called with with dimensions. """

    def counter_wrapper(fn):
        @functools.wraps(fn)
        def fn_wrapper(*args, **kwargs):
            counter("%s_calls" %
                    pyformance.registry.get_qualname(fn), **dims).inc()
            return fn(*args, **kwargs)
        return fn_wrapper
    return counter_wrapper