code: def second_prediction(self, singular_value):
          
  
          if not self.predictions:
              raise Exception("ErrVar.second(): not predictions are set")
          self.log("calc second term prediction @" + str(singular_value))
  
          mn = min(self.jco.shape)
          try:
              mn = min(self.pst.npar_adj, self.pst.nnz_obs)
          except:
              pass
          if singular_value > mn:
              inf_pred = {}
              for pred in self.predictions_iter:
                  inf_pred[("second",pred.col_names[0])] = 1.0E+35
              return inf_pred
          else:
              second_term = self.G(singular_value) * self.obscov * \
                            self.G(singular_value).T
              results = {}
              for prediction in self.predictions_iter:
                  results[("second",prediction.col_names[0])] = \
                      float((prediction.T * second_term * prediction).x)
              self.log("calc second term prediction @" + str(singular_value))
              return results
docs: get the solution space contribution to predictive error variance
              at a singular value (y^t * G * obscov * G^T * y).  Used to construct
              error variance dataframe
  
          Parameters
          ----------
          singular_value : int
              singular value to calc second term at
  
          Returns
          -------
          dict : dict
              dictionary of ("second",prediction_names), error variance