docstr: Get the location of a specific key in an index
  
  Parameters
  ----------
  key : label
      The key for which to find the location if the underlying index is
      a DateIndex or a location if the underlying index is a RangeIndex
      or an NumericIndex.
  base_index : pd.Index, optional
      Optionally the base index to search. If None, the model's index is
      searched.
  
  Returns
  -------
  loc : int
      The location of the key
  index : pd.Index
      The index including the key; this is a copy of the original index
      unless the index had to be expanded to accommodate `key`.
  index_was_expanded : bool
      Whether or not the index was expanded to accommodate `key`.
  
  Notes
  -----
  If `key` is past the end of of the given index, and the index is either
  an NumericIndex or a date index, this function extends the index up to
  and including key, and then returns the location in the new index.
docstr_tok: ["Get","the","location","of","a","specific","key","in","an","index","Parameters","--","--","--","--","--","key",":","label","The","key","for","which","to","find","the","location","if","the","underlying","index","is","a","DateIndex","or","a","location","if","the","underlying","index","is","a","RangeIndex","or","an","NumericIndex",".","base_index",":","pd.Index",",","optional","Optionally","the","base","index","to","search",".","If","None",",","the","model","'s","index","is","searched",".","Returns","--","--","--","-","loc",":","int","The","location","of","the","key","index",":","pd.Index","The","index","including","the","key",";","this","is","a","copy","of","the","original","index","unless","the","index","had","to","be","expanded","to","accommodate","`","key","`",".","index_was_expanded",":","bool","Whether","or","not","the","index","was","expanded","to","accommodate","`","key","`",".","Notes","--","--","-","If","`","key","`","is","past","the","end","of","of","the","given","index",",","and","the","index","is","either","an","NumericIndex","or","a","date","index",",","this","function","extends","the","index","up","to","and","including","key",",","and","then","returns","the","location","in","the","new","index","."]
code: def _get_index_loc(self, key, base_index=None):
      """
      Get the location of a specific key in an index
  
      Parameters
      ----------
      key : label
          The key for which to find the location if the underlying index is
          a DateIndex or a location if the underlying index is a RangeIndex
          or an NumericIndex.
      base_index : pd.Index, optional
          Optionally the base index to search. If None, the model's index is
          searched.
  
      Returns
      -------
      loc : int
          The location of the key
      index : pd.Index
          The index including the key; this is a copy of the original index
          unless the index had to be expanded to accommodate `key`.
      index_was_expanded : bool
          Whether or not the index was expanded to accommodate `key`.
  
      Notes
      -----
      If `key` is past the end of of the given index, and the index is either
      an NumericIndex or a date index, this function extends the index up to
      and including key, and then returns the location in the new index.
      """
  
      if base_index is None:
          base_index = self._index
      return get_index_loc(key, base_index)
  
imports: from __future__ import annotations
  from statsmodels.compat.pandas import is_float_index, is_int_index, is_numeric_dtype
  import numbers
  import warnings
  import numpy
  from pandas import DatetimeIndex, Index, Period, PeriodIndex, RangeIndex, Series, Timestamp, date_range, period_range, to_datetime
  from pandas.tseries.frequencies import to_offset
  from statsmodels.base.data import PandasData
  import statsmodels.base.model
  import statsmodels.base.wrapper
  from statsmodels.tools.sm_exceptions import ValueWarning
label_desc: Use image node_id 3 for calling the TimeSeriesModel obj's underlying member method code with example usage: obj._get_index_loc(key, base_index) and returns: get_index_loc