code: def __init__(self, y_t, x_t, w_t):
      exog = np.c_[x_t, w_t]  # shaped nobs x 2
  
      super().__init__(
          endog=y_t, exog=exog, k_states=2, initialization="diffuse"
      )
  
      # Since the design matrix is time-varying, it must be
      # shaped k_endog x k_states x nobs
      # Notice that exog.T is shaped k_states x nobs, so we
      # just need to add a new first axis with shape 1
      self.ssm["design"] = exog.T[
          np.newaxis, :, :
      ]  # shaped 1 x 2 x nobs
      self.ssm["selection"] = np.eye(self.k_states)
      self.ssm["transition"] = np.eye(self.k_states)
  
      # Which parameters need to be positive?
      self.positive_parameters = slice(1, 4)
  
imports: from collections import OrderedDict
  import matplotlib.pyplot
  import numpy
  import pandas
  import statsmodels.api
  import pymc3
  import theano
  import theano.tensor
label_desc: Use image node_id 1 to create a new TVRegressionExtended object from inherited base classes: sm.tsa.statespace with example: obj = TVRegressionExtended(y_t, x_t, w_t)