# Path: deepstreampy/utils.py
# class SingleNotifier(object):
# class Listener(object):
# class ResubscribeNotifier(object):
# class AckTimeoutRegistry(EventEmitter):
# class Undefined(object):
#     def __init__(self, client, connection, topic, action, timeout_duration):
#     def has_request(self, name):
#     def request(self, name, callback):
#     def receive(self, name, error, data):
#     def _on_response_timeout(self, name):
#     def _resend_requests(self):
#     def __init__(self, listener_type, pattern, callback, options, client,
#                  connection):
#     def send_destroy(self):
#     def destroy(self):
#     def accept(self, name):
#     def reject(self, name):
#     def _create_callback_response(self, message):
#     def _on_message(self, message):
#     def _send_listen(self):
#     def _on_ack_timeout(self):
#     def destroy_pending(self):
#     def send_future(self):
#     def __init__(self, client, resubscribe):
#     def destroy(self):
#     def _handle_connection_state_changes(self, state):
#     def __init__(self, client, topic, timeout_duration):
#     def add(self, name, action=None):
#     def remove(self, name, action=None):
#     def clear(self, message):
#     def _on_timeout(self, unique_name, name):
# def _pad_list(l, index, value):
#     def __repr__(self):
# def itoa(num, radix):
# def get_uid():


import re
from copy import deepcopy
from deepstreampy.utils import Undefined, num_types
        del node[last_token]
        return data

    if isinstance(node, list):
        _pad_list(node, len(node) + 1, None)

    node[last_token] = value

    return data


def _tokenize(path):
    if not path:
        return ()

    if isinstance(path, num_types):
        return [path]
    parts = re.split(SPLIT_REG_EXP, path)
    tokens = []
    for part in parts:
        if len(part) == 0:
            continue
        try:
            tokens.append(int(part))
        except ValueError:
            if part == '*':
                tokens.append(True)
            else:
                tokens.append(part)


# Path: deepstreampy/utils.py
# class SingleNotifier(object):
# class Listener(object):
# class ResubscribeNotifier(object):
# class AckTimeoutRegistry(EventEmitter):
# class Undefined(object):
#     def __init__(self, client, connection, topic, action, timeout_duration):
#     def has_request(self, name):
#     def request(self, name, callback):
#     def receive(self, name, error, data):
#     def _on_response_timeout(self, name):
#     def _resend_requests(self):
#     def __init__(self, listener_type, pattern, callback, options, client,
#                  connection):
#     def send_destroy(self):
#     def destroy(self):
#     def accept(self, name):
#     def reject(self, name):
#     def _create_callback_response(self, message):
#     def _on_message(self, message):
#     def _send_listen(self):
#     def _on_ack_timeout(self):
#     def destroy_pending(self):
#     def send_future(self):
#     def __init__(self, client, resubscribe):
#     def destroy(self):
#     def _handle_connection_state_changes(self, state):
#     def __init__(self, client, topic, timeout_duration):
#     def add(self, name, action=None):
#     def remove(self, name, action=None):
#     def clear(self, message):
#     def _on_timeout(self, unique_name, name):
# def _pad_list(l, index, value):
#     def __repr__(self):
# def itoa(num, radix):
# def get_uid():


# Path: deepstreampy/jsonpath.py
import re
from copy import deepcopy
from deepstreampy.utils import Undefined, num_types

        del node[last_token]
        return data

    if isinstance(node, list):
        _pad_list(node, len(node) + 1, None)

    node[last_token] = value

    return data


def _tokenize(path):
    if not path:
        return ()

    if isinstance(path, num_types):
        return [path]
    parts = re.split(SPLIT_REG_EXP, path)
    tokens = []
    for part in parts:
        if len(part) == 0:
            continue
        try:
            tokens.append(int(part))
        except ValueError:
            if part == '*':
                tokens.append(True)
            else:
                tokens.append(part)


    return tokens