def _get_formula_class(self, formula):
        """
        get a formula class object if it exists, else
        create one, add it to the dict, and pass return it.
        """
        # recursive import otherwise
        from sprinter.formula.base import FormulaBase
        if formula in LEGACY_MAPPINGS:
            formula = LEGACY_MAPPINGS[formula]
        formula_class, formula_url = formula, None
        if ':' in formula:
            formula_class, formula_url = formula.split(":", 1)
        if self._formula_dict not in formula_class:
            try:
                self._formula_dict[formula_class] = lib.get_subclass_from_module(formula_class, FormulaBase)
            except (SprinterException, ImportError):
                logger.info("Downloading %s..." % formula_class)
                try:
                    self._pip.install_egg(formula_url or formula_class)
                    try:
                        self._formula_dict[formula_class] = lib.get_subclass_from_module(formula_class, FormulaBase)
                    except ImportError:
                        logger.debug("FeatureDict import Error", exc_info=sys.exc_info())
                        raise SprinterException("Error: Unable to retrieve formula %s!" % formula_class)
                except PipException:
                    logger.error("ERROR: Unable to download %s!" % formula_class)
        return self._formula_dict[formula_class]
dataset/ETHPy150Open toumorokoshi/sprinter/sprinter/core/featuredict.py/FeatureDict._get_formula_class/swapped operands of `not in`