code: def pruneDutycycles(self, threshold=0.0):
      
      if threshold < 0.0:
        return
  
      # Collect all layers with 'dutyCycle'
      for m in self.modules():
        if m == self:
          continue
        if hasattr(m, 'pruneDutycycles'):
          m.pruneDutycycles(threshold)
docs: Prune all the units with dutycycles whose absolute magnitude is less than
      the given threshold
      :param threshold: min threshold to prune. If less than zero then no pruning
      :type threshold: float