code: def config_auto_wrap_policy(
      module: nn.Module,
      recurse: bool,
      unwrapped_params: int,
      module_is_root: bool,
  ) -> bool:
      """Config based policy function for :func:`auto_wrap`.
  
         Return true for a module to be wrapped if it is already tagged with
         a ``wrapper_config`` attribute.
  
      Args:
         module (nn.Module):
             The module to be considered in this decision.
         recurse (bool):
             Indicate if this is called to make a decision on whether we
             should recurse down a subgraph of the module structure.
             If False, it means this function is called to make a decision
             on whether we should wrap the said module.
         unwrapped_params (int):
             The number of parameters yet to be wrapped in this module.
             Unused by this function.
         module_is_root (bool):
             Indicates if current module is the root.
             Unused by this function.
      """
      if recurse:
          # We should always recurse.
          return True
      else:
          # If we are not recursing, determine if we should wrap.
          return hasattr(module, "wrapper_config")
  
file_path: fairscale/fairscale/nn/wrap/auto_wrap.py
imports: import contextlib
  from typing import Any, Callable, Dict, Generator, Optional, Set, Tuple, Type, cast
  import torch.nn
label_desc: Use image node_id 2 for calling a global function with example usage: config_auto_wrap_policy(module, recurse, unwrapped_params, module_is_root) and returns: True, hasattr