code: def Close(self):
      
      if not self._connection:
        raise RuntimeError('Cannot close database not opened.')
  
      # We need to run commit or not all data is stored in the database.
      self._connection.commit()
      self._connection.close()
  
      self._connection = None
      self._cursor = None
      self.filename = None
      self.read_only = None
docs: Closes the database file.
  
      Raises:
        RuntimeError: if the database is not opened.