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 __init__(
      self, endog, exog=None, missing="none", hasconst=None, **kwargs
  ):
      if data_util._is_recarray(endog) or data_util._is_recarray(exog):
          from statsmodels.tools.sm_exceptions import recarray_exception
  
          raise NotImplementedError(recarray_exception)
      if "design_info" in kwargs:
          self.design_info = kwargs.pop("design_info")
      if "formula" in kwargs:
          self.formula = kwargs.pop("formula")
      if missing != "none":
          arrays, nan_idx = self.handle_missing(
              endog, exog, missing, **kwargs
          )
          self.missing_row_idx = nan_idx
          self.__dict__.update(arrays)  # attach all the data arrays
          self.orig_endog = self.endog
          self.orig_exog = self.exog
          self.endog, self.exog = self._convert_endog_exog(
              self.endog, self.exog
          )
      else:
          self.__dict__.update(kwargs)  # attach the extra arrays anyway
          self.orig_endog = endog
          self.orig_exog = exog
          self.endog, self.exog = self._convert_endog_exog(endog, exog)
  
      self.const_idx = None
      self.k_constant = 0
      self._handle_constant(hasconst)
      self._check_integrity()
      self._cache = {}
  
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 1 to create a new ModelData object  with example: obj = ModelData(endog, exog, missing, hasconst)