def METHOD_NAME(match):
    nonlocal decorator_is_new
    existing_decorator, class_decl = match.groups()
    if existing_decorator == decorator_name:
        return match.group()
    decorator_is_new = True
    return f"\n@{decorator_name}\n{class_decl}"