code: def calc_masks(self, wrapper, wrapper_idx=None):
      if wrapper.calculated:
          return None
      sparsity = wrapper.config["sparsity"]
      masks = self.masker.calc_masks(sparsity, wrapper, wrapper_idx)
      if masks is not None:
          wrapper.calculated = True
      return masks
  
file_path: auptimizer/src/aup/compression/tensorflow/pruning/one_shot.py
imports: import tensorflow
  from ..compressor import Pruner
label_desc: Use image node_id 3 for calling the OneshotPruner obj's underlying member method code with example usage: obj.calc_masks(wrapper, wrapper_idx) and returns: masks, None