Transforming bad circumstances into ‘the path’ is associated with the practice of patience.
There are six mind-training (lojong) slogans connected with this:
Turn all mishaps into the path.
Drive all blames into one.
Be grateful to everyone.
See confusion as buddha and practice emptiness.
Do good, avoid evil, appreciate your lunacy, pray for help.
Whatever you meet is the path.