def METHOD_NAME(
    transaction_id: int | str | None = None,
    logger: Logger | None = None,
    organization: Organization | None = None,
    organization_id: int | None = None,
    **kwargs: Any,
) -> AuditLogEntry:
    """
    Creates an audit log entry for events that are triggered by Sentry's
    systems and do not have an associated Sentry user as the "actor".
    """
    if organization:
        assert organization_id is None
        organization_id = organization.id
    entry = AuditLogEntry(actor_label="Sentry", organization_id=organization_id, **kwargs)
    if entry.event is not None:
        log_service.record_audit_log(event=entry.as_event())
    extra = {
        "organization_id": entry.organization_id,
        "object_id": entry.target_object,
        "entry_id": entry.id,
        "actor_label": entry.actor_label,
    }
    if transaction_id is not None:
        extra["transaction_id"] = transaction_id
    if logger:
        # Only use the api_name for the logger message when the entry
        # is a real AuditLogEntry record
        if entry.event is not None:
            logger.info(audit_log.get(entry.event).api_name, extra=extra)
        else:
            logger.info(entry, extra=extra)
    return entry