def _guess_endog_name(self, model, typ):
        if hasattr(model, 'formula'):
            return model.formula.split("~")[0].strip()
        else:
            raise ValueError(typ % 'cannot infer %s name without formula')
dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/stats/mediation.py/Mediation._guess_endog_name/swapped operands of `%`