code: def __init__(
      self, statistic, distribution, dist_args, table=None, pvalues=None
  ):
      self.table = table
  
      self.distribution = distribution
      self.statistic = statistic
      # self.sd = sd
      self.dist_args = dist_args
  
      # The following is because I do not know which we want
      if table is not None:
          self.statistic = table["statistic"].values
          self.pvalues = table["pvalue"].values
          self.df_constraints = table["df_constraint"].values
          if self.distribution == "F":
              self.df_denom = table["df_denom"].values
  
      else:
          if self.distribution == "chi2":
              self.dist = stats.chi2
              self.df_constraints = self.dist_args[0]  # assumes tuple
              # using dist_args[0] is a bit dangerous,
          elif self.distribution == "F":
              self.dist = stats.f
              self.df_constraints, self.df_denom = self.dist_args
  
          else:
              raise ValueError(
                  "only F and chi2 are possible distribution"
              )
  
          if pvalues is None:
              self.pvalues = self.dist.sf(np.abs(statistic), *dist_args)
          else:
              self.pvalues = pvalues
  
imports: import numpy
  from scipy.stats import f
  from scipy.stats import t
  from scipy import stats
  from statsmodels.tools.tools import clean0, fullrank
  from statsmodels.stats.multitest import multipletests
label_desc: Use image node_id 1 to create a new WaldTestResults object  with example: obj = WaldTestResults(statistic, distribution, dist_args, table, pvalues)