# Path: utils/json_hooks.py
# def serializable(data):
#     def is_namedtuple(obj):
# def _object_decode_hook(dct):
# def load(fp, **kwargs):
# def loads(s, **kwargs):
# def dump(o, fp, **kwargs):
# def dumps(o, **kwargs):
# def unwrap(json_data):


import os
from utils import json_hooks as json
        if path is None:
            path = self._path
        if path is None:
            raise AttributeError("Don't know where to save statistics")

        with open(path, "w") as stat_file:
            json.dump(self._stat, stat_file, separators=(',', ':'))
        self._autosave_counter = 0

    def entries(self):
        return self._stat.items()


class BlackList:
    DEFAULT_PATH = os.path.dirname(os.path.abspath(__file__)) + "/blacklist.json"

    def __init__(self, path=DEFAULT_PATH, autosave_rate=3):
        self._path = path
        self._blacklist = dict()
        self._autosave_rate = autosave_rate
        self._autosave_counter = 0

        if path is not None:
            try:
                self.load(path)
            except FileNotFoundError:
                pass

    def load(self, path):
        with open(path, 'r') as black_file:

# Path: utils/json_hooks.py
# def serializable(data):
#     def is_namedtuple(obj):
# def _object_decode_hook(dct):
# def load(fp, **kwargs):
# def loads(s, **kwargs):
# def dump(o, fp, **kwargs):
# def dumps(o, **kwargs):
# def unwrap(json_data):


# Path: statistics/statistics.py
import os
from utils import json_hooks as json

        if path is None:
            path = self._path
        if path is None:
            raise AttributeError("Don't know where to save statistics")

        with open(path, "w") as stat_file:
            json.dump(self._stat, stat_file, separators=(',', ':'))
        self._autosave_counter = 0

    def entries(self):
        return self._stat.items()


class BlackList:
    DEFAULT_PATH = os.path.dirname(os.path.abspath(__file__)) + "/blacklist.json"

    def __init__(self, path=DEFAULT_PATH, autosave_rate=3):
        self._path = path
        self._blacklist = dict()
        self._autosave_rate = autosave_rate
        self._autosave_counter = 0

        if path is not None:
            try:
                self.load(path)
            except FileNotFoundError:
                pass

    def load(self, path):
        with open(path, 'r') as black_file:

            self._blacklist = json.load(black_file)