This is applied to reversible and irreversible processes in both closed and open systems.
An irreversible process is a two-step process.

W is for mechanically reversible process.

Through efficiency, the results are multiplied or divided to get the actual work.

If work is produced, then the absolute value for the reversible process will be too big and has to be multiplied by the efficiency.
If work is required, then the reversible process value will be too small and has to be divided by the efficiency.