<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def node_status_changed_handler(**kwargs):
 """ send notification when the status of a node changes according to users's settings """

    obj = kwargs['instance']
    obj.old_status = kwargs['old_status'].name
    obj.new_status = kwargs['new_status'].name
    queryset = exclude_owner_of_node(obj)
    create_notifications.delay(**{
        "users": queryset,
        "notification_model": Notification,
        "notification_type": "node_status_changed",
        "related_object": obj
    })

    # if node has owner send a different notification to him
    if obj.user is not None:
        create_notifications.delay(**{
            "users": [obj.user],
            "notification_model": Notification,
            "notification_type": "node_own_status_changed",
            "related_object": obj
        })