code: def _multivariate_ols_test(
      hypotheses, fit_results, exog_names, endog_names
  ):
      def fn(L, M, C):
          # .. [1] https://support.sas.com/documentation/cdl/en/statug/63033
          #        /HTML/default/viewer.htm#statug_introreg_sect012.htm
          params, df_resid, inv_cov, sscpr = fit_results
          # t1 = (L * params)M
          t1 = L.dot(params).dot(M) - C
          # H = t1'L(X'X)^L't1
          t2 = L.dot(inv_cov).dot(L.T)
          q = matrix_rank(t2)
          H = t1.T.dot(inv(t2)).dot(t1)
  
          # E = M'(Y'Y - B'(X'X)B)M
          E = M.T.dot(sscpr).dot(M)
          return E, H, q, df_resid
  
      return _multivariate_test(hypotheses, exog_names, endog_names, fn)
  
imports: import numpy
  from numpy.linalg import eigvals, inv, solve, matrix_rank, pinv, svd
  from scipy import stats
  import pandas
  from patsy import DesignInfo
  from statsmodels.compat.pandas import Substitution
  from statsmodels.base.model import Model, LikelihoodModelResults
  import statsmodels.base.wrapper
  from statsmodels.regression.linear_model import RegressionResultsWrapper
  from statsmodels.iolib import summary2
  from statsmodels.tools.decorators import cache_readonly
label_desc: Use image node_id 3 for calling a global function with example usage: _multivariate_ols_test(hypotheses, fit_results, exog_names, endog_names) and returns: _multivariate_test, E,  H,  q,  df_resid