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 _get_yarr(self, endog):
      if data_util._is_structured_ndarray(endog):
          endog = data_util.struct_to_ndarray(endog)
      endog = np.asarray(endog)
      if len(endog) == 1:  # never squeeze to a scalar
          if endog.ndim == 1:
              return endog
          elif endog.ndim > 1:
              return np.asarray([endog.squeeze()])
  
      return endog.squeeze()
  
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 18 for calling the ModelData obj's underlying member method code with example usage: obj._get_yarr(endog) and returns: endog, endog, np