class_docstr: Class responsible for handling input data and extracting metadata into the
  appropriate form
class_docstr_tok: ["Class","responsible","for","handling","input","data","and","extracting","metadata","into","the","appropriate","form"]
code: def _convert_endog_exog(self, endog, exog):
      # for consistent outputs if endog is (n,1)
      yarr = self._get_yarr(endog)
      xarr = None
      if exog is not None:
          xarr = self._get_xarr(exog)
          if xarr.ndim == 1:
              xarr = xarr[:, None]
          if xarr.ndim != 2:
              raise ValueError("exog is not 1d or 2d")
  
      return yarr, xarr
  
imports: from __future__ import annotations
  from statsmodels.compat.python import lmap
  from functools import reduce
  import numpy
  from pandas import DataFrame, Series, isnull, MultiIndex
  import statsmodels.tools.data
  from statsmodels.tools.decorators import cache_readonly, cache_writable
  from statsmodels.tools.sm_exceptions import MissingDataError
label_desc: Use image node_id 8 for calling the ModelData obj's underlying member method code with example usage: obj._convert_endog_exog(endog, exog) and returns: yarr,  xarr