parameters: (self, variable_def)
docstring: Creates a new variable from `VariableDef` protocol buffer.
  
      Args:
        variable_def: `VariableDef` protocol buffer.
docstring_summary: Creates a new variable from `VariableDef` protocol buffer.
docstring_tokens: Creates a new variable from VariableDef protocol buffer .
function: def _init_from_proto(self, variable_def):
      """Creates a new variable from `VariableDef` protocol buffer.
  
      Args:
        variable_def: `VariableDef` protocol buffer.
      """
      assert isinstance(variable_def, variable_pb2.VariableDef)
      # Create from variable_def.
      g = ops.get_default_graph()
      self._variable = g.as_graph_element(variable_def.variable_name)
      self._initializer_op = g.as_graph_element(variable_def.initializer_name)
      self._snapshot = g.as_graph_element(variable_def.snapshot_name)
      if variable_def.HasField("save_slice_info_def"):
        self._save_slice_info = Variable.SaveSliceInfo(
            save_slice_info_def=variable_def.save_slice_info_def)
      else:
        self._save_slice_info = None
      self._caching_device = None
function_tokens: def _init_from_proto ( self , variable_def ) : assert isinstance ( variable_def , variable_pb2 . VariableDef ) # Create from variable_def. g = ops . get_default_graph ( ) self . _variable = g . as_graph_element ( variable_def . variable_name ) self . _initializer_op = g . as_graph_element ( variable_def . initializer_name ) self . _snapshot = g . as_graph_element ( variable_def . snapshot_name ) if variable_def . HasField ( "save_slice_info_def" ) : self . _save_slice_info = Variable . SaveSliceInfo ( save_slice_info_def = variable_def . save_slice_info_def ) else : self . _save_slice_info = None self . _caching_device = None