def statsd_increment(counter, val=1):
 def wrapper(func):
  @wraps(func)
  def wrapped_func(*args, **kwargs):
   ret = func(*args, **kwargs)
   statsd.incr(counter, val)
   return ret
  return wrapped_func
 return wrapper

def statsd_increment ( counter , val = 1 ) : def wrapper ( func ) : @ wraps ( func ) def wrapped_func ( * args , ** kwargs ) : ret = func ( * args , ** kwargs ) statsd . incr ( counter , val ) return ret return wrapped_func return wrapper
increments a statsd counter on completion of the decorated function .