I don\'t understand this part,
with self.locks[first]: with self.locks[second]:
How can the double nested with determines who pick the left one