human
Can you provide a the Python program you requested given the following:
2. Advanced Decorators
assistant
#Here is the Python program you requested.
# Decorator that takes arguments
def logged(prefix):
    prefix = prefix if prefix else ''
    logprefix = prefix + ':' if len(prefix) > 0 else prefix
    def decorate(func):
        @wraps(func)
        def wrapper(*args, **kwargs):
            print('{}Enter:{}'.format(logprefix, func.__name__))
            result = func(*args, **kwargs)
            print('{}Exit:{}'.format(logprefix, func.__name__))
            return result
        return wrapper
    return decorate

@logged('logger')
def hello_world():
    print('hello world')

hello_world()

# always declare classmethod and staticmethod decorators first (so they are applied last)

class Spam:
    @logthis
    def instance_method(self, n):
        print(self, n)
        while n > 0:
            n -= 1

    @classmethod
    @logthis
    def class_method(cls, n):
        print(cls, n)
        while n > 0:
            n -= 1

    @staticmethod
    @logthis
    def static_method(n):
        print(n)
        while n > 0:
            n-=1

s = Spam()
s.instance_method(4)

Spam.class_method(10)