def get_recipe_instance(self, badge):
        """
        Returns the recipe instance for the given badge slug.
        If badge has not been registered, raises ``exceptions.BadgeNotFound``.
        """
        from .exceptions import BadgeNotFound
        if badge in self._registry:
            return self.recipes[badge]
        raise BadgeNotFound()
def get_recipe_instance ( self , badge ) : from . exceptions import BadgeNotFound if badge in self . _registry : return self . recipes [ badge ] raise BadgeNotFound ( )
Returns the recipe instance for the given badge slug.
        If badge has not been registered, raises ``exceptions.BadgeNotFound``.