(defaults)
Sets arg scope defaults for all items present in defaults.

  Args:
    defaults: dictionary/list of pairs, containing a mapping from
    function to a dictionary of default args.

  Yields:
    context manager where all defaults are set.
Sets arg scope defaults for all items present in defaults.
Sets arg scope defaults for all items present in defaults .
def _set_arg_scope_defaults(defaults):
  """Sets arg scope defaults for all items present in defaults.

  Args:
    defaults: dictionary/list of pairs, containing a mapping from
    function to a dictionary of default args.

  Yields:
    context manager where all defaults are set.
  """
  if hasattr(defaults, 'items'):
    items = defaults.items()
  else:
    items = defaults
  if not items:
    yield
  else:
    items = list(items)
    func, default_arg = items[0]
    with slim.arg_scope(func, **default_arg):
      with _set_arg_scope_defaults(items[1:]):
        yield
def _set_arg_scope_defaults ( defaults ) : if hasattr ( defaults , 'items' ) : items = defaults . items ( ) else : items = defaults if not items : yield else : items = list ( items ) func , default_arg = items [ 0 ] with slim . arg_scope ( func , * * default_arg ) : with _set_arg_scope_defaults ( items [ 1 : ] ) : yield