code: def test_mvmean(data, mean_null=0, return_results=True):
      """Hotellings test for multivariate mean in one sample
  
      Parameters
      ----------
      data : array_like
          data with observations in rows and variables in columns
      mean_null : array_like
          mean of the multivariate data under the null hypothesis
      return_results : bool
          If true, then a results instance is returned. If False, then only
          the test statistic and pvalue are returned.
  
      Returns
      -------
      results : instance of a results class with attributes
          statistic, pvalue, t2 and df
      (statistic, pvalue) : tuple
          If return_results is false, then only the test statistic and the
          pvalue are returned.
  
      """
      x = np.asarray(data)
      nobs, k_vars = x.shape
      mean = x.mean(0)
      cov = np.cov(x, rowvar=False, ddof=1)
      diff = mean - mean_null
      t2 = nobs * diff.dot(np.linalg.solve(cov, diff))
      factor = (nobs - 1) * k_vars / (nobs - k_vars)
      statistic = t2 / factor
      df = (k_vars, nobs - k_vars)
      pvalue = stats.f.sf(statistic, df[0], df[1])
      if return_results:
          res = HolderTuple(
              statistic=statistic,
              pvalue=pvalue,
              df=df,
              t2=t2,
              distr="F",
          )
          return res
      else:
          return statistic, pvalue
  
file_path: statsmodels/statsmodels/stats/multivariate.py
imports: import numpy
  from scipy import stats
  from statsmodels.stats.moment_helpers import cov2corr
  from statsmodels.stats.base import HolderTuple
  from statsmodels.tools.validation import array_like
label_desc: Use image node_id 2 for calling a global function with example usage: test_mvmean(data, mean_null, return_results) and returns: res, statistic,  pvalue