class_docstr: Helper class to wrap modules based on default config args via a context manager.
  See :func:`enable_wrap` for more information.
code: def enable_autowrap_context(kwargs: Any) -> None:
      if _ConfigAutoWrap.in_autowrap_context:
          raise NotImplementedError(
              "You are already within an autowrap context and we currently do not supported nested autowrap."
          )
      _ConfigAutoWrap.in_autowrap_context = True
      # Get and save the wrapper cls for the context.
      assert (
          "wrapper_cls" in kwargs.keys()
      ), "Expected to pass in wrapper_cls arg into _ConfigAutoWrap."
      _ConfigAutoWrap.wrapper_cls = cast(
          Callable, kwargs["wrapper_cls"]
      )
      del kwargs["wrapper_cls"]
      # Save the rest.
      _ConfigAutoWrap.kwargs = kwargs
  
imports: import contextlib
  import copy
  from abc import ABC, abstractmethod
  from typing import Any, Callable, cast, Dict, Generator, Iterable, Optional, Sequence, Set, Tuple, Type, Union
  import torch.nn
label_desc: Use image node_id 2 for calling the _ConfigAutoWrap obj's underlying member method code with example usage: obj.enable_autowrap_context(kwargs) without return types