code: def check_unique_element_id(cls, instance, element_id):
          
          try:
              element_ids = instance.placeholder.page.cascadepage.glossary.get('element_ids', {})
          except (AttributeError, ObjectDoesNotExist):
              pass
          else:
              if element_id:
                  for key, value in element_ids.items():
                      if str(key) != str(instance.pk) and element_id == value:
                          msg = _("The element ID '{}' is not unique for this page.")
                          raise ValidationError(msg.format(element_id))
docs: Check for uniqueness of the given element_id for the current page.
          Return None if instance is not yet associated with a page.