title: How to reset initialization in TensorFlow 2
body: <p>If I try to change parallelism in TensorFlow 2 after initializing a <code>tf.Variable</code>,</p>
  
  <pre><code>import tensorflow as tf
  _ = tf.Variable([1])
  tf.config.threading.set_inter_op_parallelism_threads(1)
  </code></pre>
  
  <p>I get an error</p>
  
  <blockquote>
    <p>RuntimeError: Inter op parallelism cannot be modified after initialization.</p>
  </blockquote>
  
  <p>I understand why that could be, but it (and possibly other factors) are causing my tests to interfere with each other. For example</p>
  
  <pre><code>def test_model():  # this test
     v = tf.Variable([1])
     ...
  
  def test_threading():  # is breaking this test
     tf.config.threading.set_inter_op_parallelism_threads(1)
     ...
  </code></pre>
  
  <p>How do I reset the TensorFlow state so that I can set the threading?</p>