docs: def maybe_automatically_publish_drafts_on_save(sender, instance, **kwargs):
      """
      If automatic publishing is enabled, immediately publish a draft copy after
      it has been saved.
      """
      # Skip processing if auto-publishing is not enabled
      if not is_automatic_publishing_enabled(sender):
          return
      # Skip missing or unpublishable instances
      if not instance or not hasattr(instance, 'publishing_linked'):
          return
      # Ignore saves of published copies
      if instance.is_published:
          return
      # Ignore saves of already-published draft copies
      if not instance.is_dirty:
          return
      # Immediately publish saved draft copy
      instance.publish()