Here's a demonstration of how to clone the 2014-2017 Nissan Leaf 23740 engine with Launch X431 ECU & TCU Programmer/ X-PROG3 PC Adapter + X431 GIII on bench. Both ECU tools are working the same way, you only need to have either one.
Procedure
Open X431 ECU & TCU Programmer/ X-PROG3 PC Adapter software.
Search: 23740
Select: Nissan, Leaf 2014-2017, EM61 EM61 109, 23740-3Nxxx-Genl_SH72531
Click "Direct connection of diagram".
Connect the original ECU according to the wiring diagram.