def register_placeholder(self, placeholder):
        # A registered placeholder must be a subclass of BBCodePlaceholder
        if not issubclass(placeholder, BBCodePlaceholder):
            raise ImproperlyConfigured(
                'BBCode Placeholders must be subclasses of BBCodePlaceholder, {!r} is not'.format(placeholder)
            )

        # Two placeholders with the same names can't be registered
        placeholder_name = placeholder.name
        if placeholder_name in self.placeholders:
            raise PlaceholderAlreadyRegistered(
                'Cannot register {!r}, a placeholder with this name ({!r}) is already registered'.format(
                    placeholder, placeholder_name)
            )

        self.placeholders[placeholder_name] = placeholder
Registers the given placeholder(s).
dataset/ETHPy150Open ellmetha/django-precise-bbcode/precise_bbcode/placeholder_pool.py/PlaceholderPool.register_placeholder