code: def close(self):
          
          if self._conn:
              if self._pooling:
                  _connection_pool.add(self._key, (self._conn, self._main_cursor._session))
              else:
                  self._conn.close()
              self._active_cursor = None
              self._main_cursor = None
              self._conn = None
          self._closed = True
docs: Close connection to an MS SQL Server.
  
          This function tries to close the connection and free all memory used.
          It can be called more than once in a row. No exception is raised in
          this case.