docstr: Estimates the scale based on the option provided to the fit method.
code: def _estimate_scale(self, resid):
      """
      Estimates the scale based on the option provided to the fit method.
      """
      if isinstance(self.scale_est, str):
          if self.scale_est.lower() == "mad":
              return scale.mad(resid, center=0)
          else:
              raise ValueError(
                  "Option %s for scale_est not understood"
                  % self.scale_est
              )
      elif isinstance(self.scale_est, scale.HuberScale):
          return self.scale_est(self.df_resid, self.nobs, resid)
      else:
          return scale.scale_est(self, resid) ** 2
  
imports: import numpy
  import scipy.stats
  import statsmodels.base.model
  import statsmodels.base.wrapper
  import statsmodels.regression._tools
  import statsmodels.regression.linear_model
  import statsmodels.robust.norms
  import statsmodels.robust.scale
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.tools.sm_exceptions import ConvergenceWarning
label_desc: Use image node_id 9 for calling the RLM obj's underlying member method code with example usage: obj._estimate_scale(resid) and returns: scale, self, unknown