def deprecate(func, old, new):
 def f(*args, **kwargs):
  warn_deprecate_obj(old, new)
  return func(*args, **kwargs)
 return f

def deprecate ( func , old , new ) : def f ( * args , ** kwargs ) : warn_deprecate_obj ( old , new ) return func ( * args , ** kwargs ) return f
warn users invoking old to switch to the new function .