code: def calcEndOfPrdvP(self):
          '''
          Calculate end-of-period marginal value of assets at each point in aNrmNow.
          Does so by taking a weighted sum of next period marginal values across
          income shocks (in a preconstructed grid self.mNrmNext).
  
          Parameters
          ----------
          none
  
          Returns
          -------
          EndOfPrdvP : np.array
              A 1D array of end-of-period marginal value of assets
          '''
  
          EndOfPrdvP  = self.DiscFacEff*self.Rfree*self.PermGroFac**(-self.CRRA)*np.sum(
                        self.PermShkVals_temp**(-self.CRRA)*
                        self.vPfuncNext(self.mNrmNext)*self.ShkPrbs_temp,axis=0)
          return EndOfPrdvf calcEndOfPrdvP(self):
          '''
          Calculate end-of-period marginal value of assets at each point in aNrmNow.
          Does so by taking a weighted sum of next period marginal values across
          income shocks (in a preconstructed grid self.mNrmNext).
  
          Parameters
          ----------
          none
  
          Returns
          -------
          EndOfPrdvP : np.array
              A 1D array of end-of-period marginal value of assets
          '''
  
          EndOfPrdvP  = self.DiscFacEff*self.Rfree*self.PermGroFac**(-self.CRRA)*np.sum(
                        self.PermShkVals_temp**(-self.CRRA)*
                        self.vPfuncNext(self.mNrmNext)*self.ShkPrbs_temp,axis=0)
          return EndOfPrdvP
docs: Calculate end-of-period marginal value of assets at each point in aNrmNow.
          Does so by taking a weighted sum of next period marginal values across
          income shocks (in a preconstructed grid self.mNrmNext).
  
          Parameters
          ----------
          none
  
          Returns
          -------
          EndOfPrdvP : np.array
              A 1D array of end-of-period marginal value of assets