请提供一个可以直接使用的、创建闭包函数的Python代码示例，我们将用这个闭包函数来创建一个带计数器的装饰器。
    def counter(func):
        def wrapper(*args, **kwargs):
            wrapper.calls += 1
            print(f'{func.__name__} has been called {wrapper.calls} times.')
            return func(*args, **kwargs)
        wrapper.calls = 0
        return wrapper
user
```python
def create_counter_decorator():
    def counter(func):
        def wrapper(*args, **kwargs):
            wrapper.calls += 1
            print(f'{func.__name__} has been called {wrapper.calls} times.')
            return func(*args, **kwargs)
        wrapper.calls = 0
        return wrapper
    return counter

# Example usage:
counter_decorator = create_counter_decorator()

@counter_decorator
def example_function():
    pass

example_function()  # Output: example_function has been called 1 times.
example_function()  # Output: example_function has been called 2 times.
```
assistant