code: def simulate(self, T):
          
          x = []
          for t in range(T):
              law_x = self.PX0() if t == 0 else self.PX(t, x[-1])
              x.append(law_x.rvs(size=1))
          y = self.simulate_given_x(x)
          return x, y
docs: Simulate state and observation processes. 
  
          Parameters
          ----------
          T: int
              processes are simulated from time 0 to time T-1
  
          Returns
          -------
          x, y: lists
              lists of length T