def add_arg_scope(func):
 @functools.wraps(func)
 def func_with_args(*args, **kwargs):
  current_scope = _current_arg_scope()
  current_args = kwargs
  key_func = (func.__module__, func.__name__)
  if (key_func in current_scope):
   current_args = current_scope[key_func].copy()
   current_args.update(kwargs)
  return func(*args, **current_args)
 _add_op(func)
 return func_with_args

def add_arg_scope ( func ) : @ functools . wraps ( func ) def func_with_args ( * args , ** kwargs ) : current_scope = _current_arg_scope ( ) current_args = kwargs key_func = ( func . __module__ , func . __name__ ) if ( key_func in current_scope ) : current_args = current_scope [ key_func ] . copy ( ) current_args . update ( kwargs ) return func ( * args , ** current_args ) _add_op ( func ) return func_with_args
decorates a function with args so it can be used within an arg_scope .