code: def cov_hc3(results):
      """
      See statsmodels.RegressionResults
      """
  
      # above probably could be optimized to only calc the diag
      h = np.diag(
          np.dot(
              results.model.exog,
              np.dot(
                  results.normalized_cov_params, results.model.exog.T
              ),
          )
      )
      het_scale = (results.resid / (1 - h)) ** 2
      cov_hc3_ = _HCCM(results, het_scale)
      return cov_hc3_
  
imports: import numpy
  from statsmodels.tools.grouputils import combine_indices, group_sums
  from statsmodels.stats.moment_helpers import se_cov
label_desc: Use image node_id 5 for calling a global function with example usage: cov_hc3(results) and returns: cov_hc3_