def register(self, name, formatter, override=False):
        if not isinstance(formatter(None, None), Formatter):
            raise TypeError(u"You can only register a Formatter not a %s" % formatter)

        if name in self._formatters and not override:
            raise AttributeError(u"%s is already a valid format type, try a new name" % name)

        self._formatters[name] = formatter
Turns a setting value into a dependency.
dataset/ETHPy150Open flosch/simpleapi/simpleapi/message/formatter.py/FormattersSingleton.register--crossover with--dataset/ETHPy150Open django/django/django/db/migrations/migration.py/swappable_dependency