parameters: (self)
docstring: Flushes and closes the summary writer.
docstring_summary: Flushes and closes the summary writer.
docstring_tokens: Flushes and closes the summary writer .
function: def close(self):
      """Flushes and closes the summary writer."""
      if self._v2 and context.executing_eagerly() and self._closed:
        return
      try:
        with ops.control_dependencies([self.flush()]):
          with ops.device("cpu:0"):
            return gen_summary_ops.close_summary_writer(self._resource)
      finally:
        if self._v2 and context.executing_eagerly():
          self._closed = True
function_tokens: def close ( self ) : if self . _v2 and context . executing_eagerly ( ) and self . _closed : return try : with ops . control_dependencies ( [ self . flush ( ) ] ) : with ops . device ( "cpu:0" ) : return gen_summary_ops . close_summary_writer ( self . _resource ) finally : if self . _v2 and context . executing_eagerly ( ) : self . _closed = True