parameters: ()
return_statement: return saver
docstring: Lazy init and return saver.
docstring_summary: Lazy init and return saver.
docstring_tokens: Lazy init and return saver .
function: def _get_saver():
    """Lazy init and return saver."""
    saver = _get_first_op_from_collection(ops.GraphKeys.SAVERS)
    if saver is not None:
      if saver:
        saver = saver[0]
      else:
        saver = None
    if saver is None and variables.all_variables():
      saver = tf_saver.Saver()
      ops.add_to_collection(ops.GraphKeys.SAVERS, saver)
    return saver
function_tokens: def _get_saver ( ) : saver = _get_first_op_from_collection ( ops . GraphKeys . SAVERS ) if saver is not None : if saver : saver = saver [ 0 ] else : saver = None if saver is None and variables . all_variables ( ) : saver = tf_saver . Saver ( ) ops . add_to_collection ( ops . GraphKeys . SAVERS , saver ) return saver