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

    """A decorator that assign a counter_type to its calculator.
    """
    def set_calculator(func):
        _counter_type_calculators[counter_type] = func
        return func
    return set_calculator