code: def argscope(layers, **kwargs):
      """
      Args:
          layers (list or layer): layer or list of layers to apply the arguments.
  
      Returns:
          a context where all appearance of these layer will by default have the
          arguments specified by kwargs.
  
      Example:
          .. code-block:: python
  
              with argscope(Conv2D, kernel_shape=3, nl=tf.nn.relu, out_channel=32):
                  x = Conv2D('conv0', x)
                  x = Conv2D('conv1', x)
                  x = Conv2D('conv2', x, out_channel=64)  # override argscope
  
      """
      if not isinstance(layers, list):
          layers = [layers]
  
      for l in layers:
          assert hasattr(
              l, "__argscope_enabled__"
          ), "Argscope not supported for {}".format(l)
  
      # need to deepcopy so that changes to new_scope does not affect outer scope
      new_scope = copy.deepcopy(get_arg_scope())
      for l in layers:
          new_scope[l.__name__].update(kwargs)
      _ArgScopeStack.append(new_scope)
      yield
      del _ArgScopeStack[-1]
  
file_path: tensorpack/tensorpack/tfutils/argscope.py
imports: import copy
  from collections import defaultdict
  from contextlib import contextmanager
  from functools import wraps
  from inspect import getmembers, isfunction
  import tensorflow
  from ..compat import is_tfv2
  from ..utils import logger
  from .model_utils import get_shape_str
  from .tower import get_current_tower_context
label_desc: Use image node_id 1 for calling a global function with example usage: argscope(layers) without return types