“scipy.optimize.least_squares”源码中的平方运算"fun**2"在哪里?

Where is the square operation "fun**2" in the source code of “scipy.optimize.least_squares”?

现在我需要将正则化项添加到“scipy.optimize.least_squares”。谁能告诉我scipy的源代码中平方运算“fun**2”在哪里?

scipy.optimize.least_squares(fun, x0,...)

In the function loss_function, lines 219-226 or 228-235 depending on whether or not the loss parameter is itself a callable. This function is called at line 826, after being gotten at line 824.