code: def _cost_method(self, *args, **kwargs):
          
  
          cost_val = 0.5 * np.linalg.norm(self.obs_data - self.op(args[0])) ** 2
  
          if 'verbose' in kwargs and kwargs['verbose']:
              print(' - DATA FIDELITY (X):', cost_val)
  
          return cost_val
docs: Calculate gradient component of the cost
  
          This method returns the l2 norm error of the difference between the
          original data and the data obtained after optimisation
  
          Returns
          -------
          float gradient cost component