code: def _make_endog_names(endog):
      if endog.ndim == 1 or endog.shape[1] == 1:
          ynames = ["y"]
      else:  # for VAR
          ynames = ["y%d" % (i + 1) for i in range(endog.shape[1])]
  
      return ynames
  
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 4 for calling a global function with example usage: _make_endog_names(endog) and returns: ynames