code: def _append_to_endog(endog, new_y):
      """Append to the endogenous array
  
      Parameters
      ----------
      endog : np.ndarray, shape=(n_samples, [1])
          The existing endogenous array
  
      new_y : np.ndarray, shape=(n_samples)
          The new endogenous array to append
      """
      return (
          np.concatenate((endog, new_y))
          if endog.ndim == 1
          else np.concatenate((endog.ravel(), new_y))[:, np.newaxis]
      )
  
imports: import pandas
  import numpy
  import numpy.polynomial.polynomial
  import numbers
  import warnings
  from scipy.stats import gaussian_kde, norm
  from sklearn.utils.validation import check_array
  from statsmodels import api
  from .None import _validation
  from ..base import BaseARIMA
  from ..compat.numpy import DTYPE
  from ..compat.sklearn import check_is_fitted, if_delegate_has_method, safe_indexing
  from ..compat import statsmodels
  from ..compat import matplotlib
  from ..utils import if_has_delegate, is_iterable, check_endog, check_exog
  from ..utils.visualization import _get_plt
  from ..utils.array import diff_inv, diff
  import pmdarima
label_desc: Use image node_id 3 for calling a global function with example usage: _append_to_endog(endog, new_y) and returns: unknown