class_docstr: Time-varying state space model for testing
  
  This creates a state space model with randomly generated time-varying
  system matrices. When used in a test, that test should use
  `reset_randomstate` to ensure consistent test runs.
code: def clone(self, endog, exog=None, **kwargs):
      mod = self.__class__(endog, **kwargs)
  
      for key in self.ssm.shapes.keys():
          if key in ["obs", "state_intercept"]:
              continue
          n = min(self.nobs, mod.nobs)
          mod[key, ..., :n] = self.ssm[key, ..., :n]
  
      return mod
  
imports: from statsmodels.compat.pandas import MONTH_END
  import warnings
  import numpy
  from numpy.testing import assert_, assert_allclose
  import pandas
  import pytest
  from scipy.stats import ortho_group
  from statsmodels.tools.sm_exceptions import EstimationWarning
  from statsmodels.tsa.statespace import dynamic_factor, mlemodel, sarimax, structural, varmax
  from statsmodels.tsa.vector_ar.tests.test_var import get_macrodata
label_desc: Use image node_id 2 for calling the TVSS obj's underlying member method code with example usage: obj.clone(endog, exog) and returns: mod