parameters: (name_or_scope,
                           reuse=None,
                           initializer=None,
                           regularizer=None,
                           caching_device=None,
                           partitioner=None,
                           custom_getter=None,
                           old_name_scope=None,
                           dtype=dtypes.float32)
docstring: Creates a context for the variable_scope, see `variable_scope` for docs.
  
    Note: this does not create a name scope.
  
    Args:
      name_or_scope: `string` or `VariableScope`: the scope to open.
      reuse: `True` or `None`; if `True`, we go into reuse mode for this scope as
        well as all sub-scopes; if `None`, we just inherit the parent scope reuse.
      initializer: default initializer for variables within this scope.
      regularizer: default regularizer for variables within this scope.
      caching_device: default caching device for variables within this scope.
      partitioner: default partitioner for variables within this scope.
      custom_getter: default custom getter for variables within this scope.
      old_name_scope: the original name scope when re-entering a variable scope.
      dtype: type of the variables within this scope (defaults to `DT_FLOAT`).
  
    Yields:
      A scope that can be to captured and reused.
  
    Raises:
      ValueError: when trying to reuse within a create scope, or create within
        a reuse scope, or if reuse is not `None` or `True`.
      TypeError: when the types of some arguments are not appropriate.
docstring_summary: Creates a context for the variable_scope, see `variable_scope` for docs.
docstring_tokens: Creates a context for the variable_scope see variable_scope for docs .
function: def _pure_variable_scope(name_or_scope,
                           reuse=None,
                           initializer=None,
                           regularizer=None,
                           caching_device=None,
                           partitioner=None,
                           custom_getter=None,
                           old_name_scope=None,
                           dtype=dtypes.float32):
    """Creates a context for the variable_scope, see `variable_scope` for docs.
  
    Note: this does not create a name scope.
  
    Args:
      name_or_scope: `string` or `VariableScope`: the scope to open.
      reuse: `True` or `None`; if `True`, we go into reuse mode for this scope as
        well as all sub-scopes; if `None`, we just inherit the parent scope reuse.
      initializer: default initializer for variables within this scope.
      regularizer: default regularizer for variables within this scope.
      caching_device: default caching device for variables within this scope.
      partitioner: default partitioner for variables within this scope.
      custom_getter: default custom getter for variables within this scope.
      old_name_scope: the original name scope when re-entering a variable scope.
      dtype: type of the variables within this scope (defaults to `DT_FLOAT`).
  
    Yields:
      A scope that can be to captured and reused.
  
    Raises:
      ValueError: when trying to reuse within a create scope, or create within
        a reuse scope, or if reuse is not `None` or `True`.
      TypeError: when the types of some arguments are not appropriate.
  
    """
    get_variable_scope()  # Ensure that a default exists, then get a pointer.
    # Get the reference to the collection as we want to modify it in place.
    default_varscope = ops.get_collection_ref(_VARSCOPE_KEY)
    old = default_varscope[0]
    var_store = _get_default_variable_store()
    if isinstance(name_or_scope, VariableScope):
      new_name = name_or_scope.name
    else:
      new_name = old.name + "/" + name_or_scope if old.name else name_or_scope
    try:
      var_store.open_variable_scope(new_name)
      if isinstance(name_or_scope, VariableScope):
        name_scope = name_or_scope._name_scope  # pylint: disable=protected-access
        # Handler for the case when we jump to a shared scope.
        #   We create a new VariableScope (default_varscope[0]) that contains
        #   a copy of the provided shared scope, possibly with changed reuse
        #   and initializer, if the user requested this.
        default_varscope[0] = VariableScope(
            name_or_scope.reuse if reuse is None else reuse,
            name=new_name,
            initializer=name_or_scope.initializer,
            regularizer=name_or_scope.regularizer,
            caching_device=name_or_scope.caching_device,
            partitioner=name_or_scope.partitioner,
            dtype=name_or_scope.dtype,
            custom_getter=name_or_scope.custom_getter,
            name_scope=name_scope)
        if initializer is not None:
          default_varscope[0].set_initializer(initializer)
        if regularizer is not None:
          default_varscope[0].set_regularizer(regularizer)
        if caching_device is not None:
          default_varscope[0].set_caching_device(caching_device)
        if partitioner is not None:
          default_varscope[0].set_partitioner(partitioner)
        if custom_getter is not None:
          default_varscope[0].set_custom_getter(custom_getter)
        if dtype is not None:
          default_varscope[0].set_dtype(dtype)
        yield default_varscope[0]
      else:
        # Handler for the case when we just prolong current variable scope.
        #   VariableScope with name extended by the provided one, and inherited
        #   reuse and initializer (except if the user provided values to set).
        reuse = reuse or old.reuse  # Re-using is inherited by sub-scopes.
        default_varscope[0] = VariableScope(
            reuse,
            name=new_name,
            initializer=old.initializer,
            regularizer=old.regularizer,
            caching_device=old.caching_device,
            partitioner=old.partitioner,
            dtype=old.dtype,
            custom_getter=old.custom_getter,
            name_scope=old_name_scope or name_or_scope)
        if initializer is not None:
          default_varscope[0].set_initializer(initializer)
        if regularizer is not None:
          default_varscope[0].set_regularizer(regularizer)
        if caching_device is not None:
          default_varscope[0].set_caching_device(caching_device)
        if partitioner is not None:
          default_varscope[0].set_partitioner(partitioner)
        if custom_getter is not None:
          default_varscope[0].set_custom_getter(custom_getter)
        if dtype is not None:
          default_varscope[0].set_dtype(dtype)
        yield default_varscope[0]
    finally:
      var_store.close_variable_subscopes(new_name)
      default_varscope[0] = old
function_tokens: def _pure_variable_scope ( name_or_scope , reuse = None , initializer = None , regularizer = None , caching_device = None , partitioner = None , custom_getter = None , old_name_scope = None , dtype = dtypes . float32 ) : get_variable_scope ( ) # Ensure that a default exists, then get a pointer. # Get the reference to the collection as we want to modify it in place. default_varscope = ops . get_collection_ref ( _VARSCOPE_KEY ) old = default_varscope [ 0 ] var_store = _get_default_variable_store ( ) if isinstance ( name_or_scope , VariableScope ) : new_name = name_or_scope . name else : new_name = old . name + "/" + name_or_scope if old . name else name_or_scope try : var_store . open_variable_scope ( new_name ) if isinstance ( name_or_scope , VariableScope ) : name_scope = name_or_scope . _name_scope # pylint: disable=protected-access # Handler for the case when we jump to a shared scope. #   We create a new VariableScope (default_varscope[0]) that contains #   a copy of the provided shared scope, possibly with changed reuse #   and initializer, if the user requested this. default_varscope [ 0 ] = VariableScope ( name_or_scope . reuse if reuse is None else reuse , name = new_name , initializer = name_or_scope . initializer , regularizer = name_or_scope . regularizer , caching_device = name_or_scope . caching_device , partitioner = name_or_scope . partitioner , dtype = name_or_scope . dtype , custom_getter = name_or_scope . custom_getter , name_scope = name_scope ) if initializer is not None : default_varscope [ 0 ] . set_initializer ( initializer ) if regularizer is not None : default_varscope [ 0 ] . set_regularizer ( regularizer ) if caching_device is not None : default_varscope [ 0 ] . set_caching_device ( caching_device ) if partitioner is not None : default_varscope [ 0 ] . set_partitioner ( partitioner ) if custom_getter is not None : default_varscope [ 0 ] . set_custom_getter ( custom_getter ) if dtype is not None : default_varscope [ 0 ] . set_dtype ( dtype ) yield default_varscope [ 0 ] else : # Handler for the case when we just prolong current variable scope. #   VariableScope with name extended by the provided one, and inherited #   reuse and initializer (except if the user provided values to set). reuse = reuse or old . reuse # Re-using is inherited by sub-scopes. default_varscope [ 0 ] = VariableScope ( reuse , name = new_name , initializer = old . initializer , regularizer = old . regularizer , caching_device = old . caching_device , partitioner = old . partitioner , dtype = old . dtype , custom_getter = old . custom_getter , name_scope = old_name_scope or name_or_scope ) if initializer is not None : default_varscope [ 0 ] . set_initializer ( initializer ) if regularizer is not None : default_varscope [ 0 ] . set_regularizer ( regularizer ) if caching_device is not None : default_varscope [ 0 ] . set_caching_device ( caching_device ) if partitioner is not None : default_varscope [ 0 ] . set_partitioner ( partitioner ) if custom_getter is not None : default_varscope [ 0 ] . set_custom_getter ( custom_getter ) if dtype is not None : default_varscope [ 0 ] . set_dtype ( dtype ) yield default_varscope [ 0 ] finally : var_store . close_variable_subscopes ( new_name ) default_varscope [ 0 ] = old