def update_counters(rex, node_info=None, db=None):
 def wrapper(func):
  @functools.wraps(func)
  def wrapped(*args, **kwargs):
   ret = func(*args, **kwargs)
   page = build_page(rex, kwargs)
   update_counter(page, node_info, db)
   return ret
  return wrapped
 return wrapper

def update_counters ( rex , node_info = None , db = None ) : def wrapper ( func ) : @ functools . wraps ( func ) def wrapped ( * args , ** kwargs ) : ret = func ( * args , ** kwargs ) page = build_page ( rex , kwargs ) update_counter ( page , node_info , db ) return ret return wrapped return wrapper
create a decorator that updates analytics in pagecounters when the decorated function is called .