Template:M summ 2002 ISDA Close-out Amount
From the you’ll be sorry you asked file. Have a butcher’s at the nutshell version on the right. If, having read that, you’re still not really feeling sorry or resentful, the full text (below) right might get your remorse radar pinging.
Note the prominent requirement to achieve a “reasonable” (1992 ISDA) or “commercially reasonable” (2002 ISDA) result. On what that latter lovely expression means see Barclays v Unicredit. Spoiler: it’s basically good for brokers as long as they aren’t being total dicks.