def METHOD_NAME(self, params, scale=None, **kwds):
    if scale is None:
        # special handling for GLM
        if hasattr(self, 'scaletype'):
            mu = self.predict(params)
            scale = self.estimate_scale(mu)
        else:
            scale = 1
    return scale