class_docstr: This is a temporary base model from ETS, here I just copy everything I need
  from statespace.mlemodel.MLEModel
class_docstr_tok: ["This","is","a","temporary","base","model","from","ETS",",","here","I","just","copy","everything","I","need","from","statespace.mlemodel.MLEModel"]
code: def _wrap_data(self, data, start_idx, end_idx, names=None):
      # TODO: check if this is reasonable for statespace
      # squeezing data: data may be:
      # - m x n: m dates, n simulations -> squeeze does nothing
      # - m x 1: m dates, 1 simulation -> squeeze removes last dimension
      # - 1 x n: don't squeeze, already fine
      # - 1 x 1: squeeze only second axis
      if data.ndim > 1 and data.shape[1] == 1:
          data = np.squeeze(data, axis=1)
      if self.use_pandas:
          if data.shape[0]:
              _, _, _, index = self._get_prediction_index(
                  start_idx, end_idx
              )
          else:
              index = None
          if data.ndim < 2:
              data = pd.Series(data, index=index, name=names)
          else:
              data = pd.DataFrame(data, index=index, columns=names)
      return data
  
imports: from collections import OrderedDict
  import contextlib
  import warnings
  import numpy
  import pandas
  from scipy.stats import norm
  from statsmodels.base.data import PandasData
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.tools.eval_measures import aic, aicc, bic, hqic
  from statsmodels.tools.sm_exceptions import PrecisionWarning
  from statsmodels.tools.numdiff import _get_epsilon, approx_fprime, approx_fprime_cs, approx_hess_cs
  from statsmodels.tools.tools import pinv_extended
  import statsmodels.tsa.base.tsa_model
  from statsmodels.tsa.statespace.tools import _safe_cond
label_desc: Use image node_id 11 for calling the StateSpaceMLEModel obj's underlying member method code with example usage: obj._wrap_data(data, start_idx, end_idx, names) and returns: data