parameters: (raw_assign_fn, use_handle=True)
return_statement: return assign_fn
docstring: Wrap `raw_assign_fn` with the proper graph context and device scope.
  
    Args:
      raw_assign_fn: the function to be wrapped.
      use_handle: if True, the `raw_assign_fn` will be applied to the handle of a
        variable; otherwise it will be applied to the variable itself.
  
    Returns:
      The wrapped function.
docstring_summary: Wrap `raw_assign_fn` with the proper graph context and device scope.
docstring_tokens: Wrap raw_assign_fn with the proper graph context and device scope .
function: def make_raw_assign_fn(raw_assign_fn, use_handle=True):
    """Wrap `raw_assign_fn` with the proper graph context and device scope.
  
    Args:
      raw_assign_fn: the function to be wrapped.
      use_handle: if True, the `raw_assign_fn` will be applied to the handle of a
        variable; otherwise it will be applied to the variable itself.
  
    Returns:
      The wrapped function.
    """
  
    def assign_fn(var, value, use_locking=False, name=None, read_value=True):
      del use_locking  # Unused.
  
      handle = var.handle if use_handle else var
      with _maybe_enter_graph(handle), _maybe_on_device(var):
        op = raw_assign_fn(
            handle, ops.convert_to_tensor(value, dtype=var.dtype), name=name)
        with ops.control_dependencies([op]):
          if read_value:
            return var._read_variable_op() if use_handle else var.read_value()  # pylint: disable=protected-access
          else:
            return op
  
    return assign_fn
function_tokens: def make_raw_assign_fn ( raw_assign_fn , use_handle = True ) : def assign_fn ( var , value , use_locking = False , name = None , read_value = True ) : del use_locking # Unused. handle = var . handle if use_handle else var with _maybe_enter_graph ( handle ) , _maybe_on_device ( var ) : op = raw_assign_fn ( handle , ops . convert_to_tensor ( value , dtype = var . dtype ) , name = name ) with ops . control_dependencies ( [ op ] ) : if read_value : return var . _read_variable_op ( ) if use_handle else var . read_value ( ) # pylint: disable=protected-access else : return op return assign_fn