title: Implicitly enable TensorFlow v2 behaviour in TensorFlow v1
body: <p>As part of our migration to TensorFlow 2 I'd like to enable TensorFlow v2 behaviour in TensorFlow v1 (specifically TensorFlow 1.14). I'm aware that I can call <code>tf.enable_v2_behavior()</code> to do this, but I'd like to do this implicitly (via an environment variable or similar) without having to explicitly call this function.</p>
  
  <p>The reason I want to do this is so that people don't forget to do this, and don't accidently end up with v1 behaviour. I can ensure that <code>tf.enable_v2_behavior()</code> is called before any tests are run, but then the underlying behaviour of our code may be different outside of the test environment (the tests may pass, but the code fails when run outside of the test environment).</p>
  
  <p>Any environment variable would probably work, as I can pretty much guarantee that this is set in all our docker images, but I'm open to alternatives. I could do this on import of a specific module, but I can't guarantee that a particular module will always be imported (except for <code>tensorflow</code>!).</p>
  
  <p>The docs for <code>enable_v2_behavior</code> state "This function is called in the main TensorFlow <code>__init__.py</code> file, user should not need to call it, except during complex migrations.", but this doesn't appear to be true (at least in TensorFlow 1.14; this is true for TensorFlow 2.0 I guess).</p>