Now the above mentioned is most likely the top pragmatic immediate solution here, but you will find the potential for a race condition (based on what you're making an attempt to perform), and The truth that the fundamental implementation utilizes a try, but Python works by using consider almost everywhere in its implementation." This isn't usually