parameters: (self)
docstring: Flush and close the mailbox.
docstring_summary: Flush and close the mailbox.
docstring_tokens: Flush and close the mailbox .
function: def close(self):
          """Flush and close the mailbox."""
          try:
              self.flush()
          finally:
              try:
                  if self._locked:
                      self.unlock()
              finally:
                  self._file.close()
function_tokens: def close ( self ) : try : self . flush ( ) finally : try : if self . _locked : self . unlock ( ) finally : self . _file . close ( )