code: def update_mask(self, module, tensor_name, **kwargs):
      # tensor_name will give you the FQN, all other entries in sparse config is present in kwargs
      weights = getattr(module, tensor_name)
      mask = getattr(module.parametrizations, tensor_name)[0].mask
  
      # use negative weights so we can use topk (we prune out the smallest)
      if weights.dim() <= 1:
          raise Exception(
              "Structured pruning can only be applied to a 2+dim weight tensor!"
          )
      saliency = -weights.norm(dim=tuple(range(1, weights.dim())), p=1)
      assert saliency.shape == mask.shape
  
      num_to_pick = int(len(mask) * kwargs["sparsity_level"])
      prune = saliency.topk(num_to_pick).indices
  
      # Set the mask to be false for the rows we want to prune
      mask.data[prune] = False
  
label_desc: Use image node_id 1 for calling the SaliencyPruner obj's underlying member method code with example usage: obj.update_mask(module, tensor_name) without return types