docs: def F_t(X, Y, S, M_E, E, m0, rho):
      ''' Compute the distortion '''
      r = X.shape[1]
      out1 = (((np.dot(np.dot(X, S), Y.T) - M_E) * E)**2).sum() / 2
      out2 = rho * G(Y, m0, r)
      out3 = rho * G(X, m0, r)
  
      return out1 + out2 + out3