code: def d2ASbr_dV2(self, dSbr_dVa, dSbr_dVm, Sbr, Cbr, Ybr, V, lam):
          
          il = range(len(lam))
  
          diaglam = csr_matrix((lam, (il, il)))
          diagSbr_conj = csr_matrix((Sbr.conj(), (il, il)))
  
          Saa, Sav, Sva, Svv = self.d2Sbr_dV2(Cbr, Ybr, V, diagSbr_conj * lam)
  
          Haa = 2 * ( Saa + dSbr_dVa.T * diaglam * dSbr_dVa.conj() ).real
          Hva = 2 * ( Sva + dSbr_dVm.T * diaglam * dSbr_dVa.conj() ).real
          Hav = 2 * ( Sav + dSbr_dVa.T * diaglam * dSbr_dVm.conj() ).real
          Hvv = 2 * ( Svv + dSbr_dVm.T * diaglam * dSbr_dVm.conj() ).real
  
          return Haa, Hav, Hva, Hvv
docs: Based on d2ASbr_dV2.m from MATPOWER by Ray Zimmerman, developed
          at PSERC Cornell. See U{http://www.pserc.cornell.edu/matpower/} for
          more information.
  
          @rtype: tuple
          @return: The 2nd derivatives of |complex power flow|**2 w.r.t. V.