class_docstr: State space representation of a time series process, with Kalman filter
  and smoother, and with simulation smoother.
  
  Parameters
  ----------
  k_endog : {array_like, int}
      The observed time-series process :math:`y` if array like or the
      number of variables in the process if an integer.
  k_states : int
      The dimension of the unobserved state process.
  k_posdef : int, optional
      The dimension of a guaranteed positive definite covariance matrix
      describing the shocks in the measurement equation. Must be less than
      or equal to `k_states`. Default is `k_states`.
  simulation_smooth_results_class : class, optional
      Default results class to use to save output of simulation smoothing.
      Default is `SimulationSmoothResults`. If specified, class must extend
      from `SimulationSmoothResults`.
  simulation_smoother_classes : dict, optional
      Dictionary with BLAS prefixes as keys and classes as values.
  **kwargs
      Keyword arguments may be used to provide default values for state space
      matrices, for Kalman filtering options, for Kalman smoothing
      options, or for Simulation smoothing options.
      See `Representation`, `KalmanFilter`, and `KalmanSmoother` for more
      details.
code: def _simulate(
      self,
      nsimulations,
      simulator=None,
      random_state=None,
      return_simulator=False,
      **kwargs,
  ):
      # Create the simulator, if necessary
      if simulator is None:
          simulator = self.simulator(
              nsimulations, random_state=random_state
          )
  
      # Perform simulation smoothing
      simulator.simulate(**kwargs)
  
      # Retrieve and return the objects of interest
      simulated_obs = np.array(simulator.generated_obs, copy=True)
      simulated_state = np.array(simulator.generated_state, copy=True)
  
      out = (
          simulated_obs.T[:nsimulations],
          simulated_state.T[:nsimulations],
      )
      if return_simulator:
          out = out + (simulator,)
      return out
  
imports: import numbers
  import warnings
  import numpy
  from .kalman_smoother import KalmanSmoother
  from .cfa_simulation_smoother import CFASimulationSmoother
  from .None import tools
label_desc: Use image node_id 3 for calling the SimulationSmoother obj's underlying member method code with example usage: obj._simulate(nsimulations, simulator, random_state, return_simulator) and returns: out