title: Tensorflow: tf.name_scope without 'with'
body: <p>I would like to use <code>tf.name_scope</code> for something like this:</p>
  
  <pre><code>my_scope = tf.name_scope('something')
  
  if cond_1:
      foo(my_scope)
  
  if cond_2:
      bar(my_scope)
  </code></pre>
  
  <p>I would like to avoid using the <code>with tf.name_scope('something') as scope</code> notation, as I don't know when the first time I want to use the name scope <code>something</code>.
  The simple <code>my_scope = tf.name_scope('something')</code> doesn't work, resulting in the error <code>TypeError: expected string or buffer</code>.</p>
  
  <p>Right now I use:</p>
  
  <pre><code>with tf.name_scope('something') as scope:
      pass
  my_scope = scope
  
  if cond_1:
      foo(my_scope)
  
  if cond_2:
      bar(my_scope)
  </code></pre>
  
  <p>which works, but is very unsatisfying.</p>