<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _domain_event_lifecycle_cb(conn, domain, event, detail, opaque):
    '''
    Domain lifecycle events handler
    '''
    event_str, detail_str = _get_domain_event_detail(event, detail)

    _salt_send_domain_event(opaque, conn, domain, opaque['event'], {
        'event':  event_str,
        'detail': detail_str
    })