parameters: (name)
docstring: ContextManager for creating hierarchical name scopes.
docstring_summary: ContextManager for creating hierarchical name scopes.
docstring_tokens: ContextManager for creating hierarchical name scopes .
function: def namescope(name):
    """ContextManager for creating hierarchical name scopes."""
    ctx = context()
    old_name = ctx.scope_name
    ctx.scope_name = "%s/%s" % (old_name, name) if old_name else name
    try:
      yield
    finally:
      ctx.scope_name = old_name
function_tokens: def namescope ( name ) : ctx = context ( ) old_name = ctx . scope_name ctx . scope_name = "%s/%s" % ( old_name , name ) if old_name else name try : yield finally : ctx . scope_name = old_name