code: def updatePrefShockProcess(self):
          '''
          Make a discrete preference shock structure for each period in the cycle
          for this agent type, storing them as attributes of self for use in the
          solution (and other methods).
  
          Parameters
          ----------
          none
  
          Returns
          -------
          none
          '''
          time_orig = self.time_flow
          self.timeFwd()
  
          PrefShkDstn = [] # discrete distributions of preference shocks
          for t in range(len(self.PrefShkStd)):
              PrefShkStd = self.PrefShkStd[t]
              PrefShkDstn.append(approxMeanOneLognormal(N=self.PrefShkCount,
                                                        sigma=PrefShkStd,tail_N=self.PrefShk_tail_N))
  
          # Store the preference shocks in self (time-varying) and restore time flow
          self.PrefShkDstn = PrefShkDstn
          self.addToTimeVary('PrefShkDstn')
          if not time_orig:
              self.timeRev(f updatePrefShockProcess(self):
          '''
          Make a discrete preference shock structure for each period in the cycle
          for this agent type, storing them as attributes of self for use in the
          solution (and other methods).
  
          Parameters
          ----------
          none
  
          Returns
          -------
          none
          '''
          time_orig = self.time_flow
          self.timeFwd()
  
          PrefShkDstn = [] # discrete distributions of preference shocks
          for t in range(len(self.PrefShkStd)):
              PrefShkStd = self.PrefShkStd[t]
              PrefShkDstn.append(approxMeanOneLognormal(N=self.PrefShkCount,
                                                        sigma=PrefShkStd,tail_N=self.PrefShk_tail_N))
  
          # Store the preference shocks in self (time-varying) and restore time flow
          self.PrefShkDstn = PrefShkDstn
          self.addToTimeVary('PrefShkDstn')
          if not time_orig:
              self.timeRev()
docs: Make a discrete preference shock structure for each period in the cycle
          for this agent type, storing them as attributes of self for use in the
          solution (and other methods).
  
          Parameters
          ----------
          none
  
          Returns
          -------
          none