code: def _check_nested_exog(small, large):
      """
      Check if a larger exog nests a smaller exog
  
      Parameters
      ----------
      small : ndarray
          exog from smaller model
      large : ndarray
          exog from larger model
  
      Returns
      -------
      bool
          True if small is nested by large
      """
  
      if small.shape[1] > large.shape[1]:
          return False
      coef = np.linalg.lstsq(large, small, rcond=None)[0]
      err = small - large @ coef
      return np.linalg.matrix_rank(np.c_[large, err]) == large.shape[1]
  
imports: from statsmodels.compat.pandas import deprecate_kwarg
  from collections.abc import Iterable
  import numpy
  import pandas
  from scipy import stats
  from statsmodels.regression.linear_model import OLS, RegressionResultsWrapper
  from statsmodels.stats._adnorm import anderson_statistic, normal_ad
  from statsmodels.stats._lilliefors import kstest_exponential, kstest_fit, kstest_normal, lilliefors
  from statsmodels.tools.validation import array_like, bool_like, dict_like, float_like, int_like, string_like
  from statsmodels.tsa.tsatools import lagmat
label_desc: Use image node_id 1 for calling a global function with example usage: _check_nested_exog(small, large) and returns: unknown, False