def static_vars(**kwargs):
    """
    Custom decorator to allow declaration of static variables like this:\n
    @static_var(variable = 0)\n
    def foo(parameters):\n
        foo.variable += 1
    """
    def decorate(func):
        for k in kwargs:
            setattr(func, k, kwargs[k])
        return func
    return decorate