code: def _nested_multiply_update_masks(
      default_dict: _MASKS, update_dict: _MASKS
  ):
      # if a target already has a mask, the old one will multiply the new one as the target mask,
      # that means the mask in default dict will more and more sparse.
      for module_name, target_tensors in update_dict.items():
          for target_name, target_tensor in target_tensors.items():
              if target_name in default_dict[
                  module_name
              ] and isinstance(
                  default_dict[module_name][target_name], torch.Tensor
              ):
                  default_dict[module_name][target_name] = (
                      (
                          default_dict[module_name][target_name]
                          * target_tensor
                      )
                      .bool()
                      .float()
                  )
              else:
                  default_dict[module_name][target_name] = target_tensor
  
imports: from __future__ import annotations
  from collections import defaultdict
  from functools import reduce
  import heapq
  from typing import Callable, Dict, List, Tuple
  import numpy
  import torch
  from .calculate_metrics import _METRICS
  from ...base.compressor import _PRUNING_TARGET_SPACES
  from ...base.target_space import PruningTargetSpace, TargetType
label_desc: Use image node_id 11 for calling a global function with example usage: _nested_multiply_update_masks(default_dict, update_dict) without return types