code: def _cost_method(self, *args, **kwargs):
          
  
          cost_val = np.sum(np.abs(self.weights * self._linear.op(args[0])))
  
          if 'verbose' in kwargs and kwargs['verbose']:
              print(' - L1 NORM (X):', cost_val)
  
          return cost_val
docs: Calculate sparsity component of the cost
  
          This method returns the l1 norm error of the weighted wavelet
          coefficients
  
          Returns
          -------
          float sparsity cost component