@function.defun
def create_variable():
    with ops.name_scope('foo'):
        v = variables.Variable(0.0, name='bar')
    self.assertEqual(v.name, 'foo/bar:0')
@function.defun
def create_variable():
    with ops.name_scope('foo'):
        v = variables.Variable(0.0, name='bar')
    self.assertEqual(v.name, 'foo/bar:0')