def __init__(self, slot, title=None, role=None, fallback_language=None):
        """
        Create the placeholder data with a slot, and optional title and role.
        """
        if not slot:
            raise ValueError("Slot not defined for placeholder!")

        self.slot = slot
        self.title = title or self.slot
        self.role = self.ROLE_ALIASES.get(role, role or Placeholder.MAIN)
        self.fallback_language = fallback_language or None

        # Ensure upfront value checking
        if self.role not in _ALLOWED_ROLES:
            raise ValueError("Invalid role '{0}' for placeholder '{1}': allowed are: {2}.".format(self.role, self.title or self.slot, ', '.join(list(self.ROLE_ALIASES.keys()))))
dataset/ETHPy150Open edoburu/django-fluent-contents/fluent_contents/models/__init__.py/PlaceholderData.__init__/original