def as_event_result(command_result: CommandResult) -> EventResult:
    """Translates command result to event result"""
    return EventResult(
        payload=command_result.payload,
        events=command_result.events,
        errors=command_result.errors,
    )
Translates command result to event result
src/seedwork/application/utils.py