human
Complete the below
def if_notifications_enabled(f):

    ''''Calls decorated method only if versioned notifications are enabled.'
    '''
 ... What is a the Python code you requested?
assistant
#Here is the Python code you requested.
    @functools.wraps(f)
    def wrapped(*args, **kwargs):
        if (NOTIFIER.is_enabled() and (CONF.notifications.notification_format in ('both', 'versioned'))):
            return f(*args, **kwargs)
        else:
            return None
    return wrapped