docstr: Get all masks registered in the wrappers.
  
  Returns
  -------
  Dict[str, Dict[str, torch.Tensor]]
      The masks' format is {module_name: {target_name: target_masks}}.
      For example, {'layer.0.conv1': {'weight': weight_mask_tensor, 'bias': bias_mask_tensor}}.
docstr_tok: ["Get","all","masks","registered","in","the","wrappers",".","Returns","--","--","--","-","Dict","[","str",",","Dict","[","str",",","torch.Tensor","]","]","The","masks","'","format","is","{","module_name",":","{","target_name",":","target_masks","}","}",".","For","example",",","{","'layer.0.conv1","'",":","{","'weight","'",":","weight_mask_tensor",",","'bias","'",":","bias_mask_tensor","}","}","."]
code: def get_masks(self) -> Dict[str, Dict[str, torch.Tensor]]:
      """
      Get all masks registered in the wrappers.
  
      Returns
      -------
      Dict[str, Dict[str, torch.Tensor]]
          The masks' format is {module_name: {target_name: target_masks}}.
          For example, {'layer.0.conv1': {'weight': weight_mask_tensor, 'bias': bias_mask_tensor}}.
      """
      masks = defaultdict(dict)
      for module_name, wrapper in self._module_wrappers.items():
          for (
              target_name,
              target_space,
          ) in wrapper.pruning_target_spaces.items():
              masks[module_name][target_name] = (
                  target_space.mask.clone()
                  if target_space.mask is not None
                  else None
              )
      return masks
  
imports: from __future__ import annotations
  from collections import defaultdict
  from copy import deepcopy
  import logging
  from typing import Any, Dict, List, Literal, Callable
  import torch
  from torch.utils._pytree import tree_map
  from .config import trans_legacy_config_list, default_config_schema
  from .target_space import TargetSpace, TargetType, DistillationTargetSpace, PruningTargetSpace, QuantizationTargetSpace
  from .wrapper import ModuleWrapper, register_wrappers
  from ..utils import Evaluator, Scaling, _EVALUATOR_DOCSTRING
label_desc: Use image node_id 4 for calling the Pruner obj's underlying member method code with example usage: obj.get_masks() and returns: masks