human
I am working on the file "CapstoneSEER/SEER Data Analysis Phase 1- Ingestion.ipynb".
The first task is:
The LoadSeerData class opens a connection to the database
Can you write Python program for it?
 ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

class LoadSeerData(MasterSeer):

    def __init__(self, path=r'./data', reload=True, testMode=False, verbose=True, batch=10000):

        # user supplied parameters
        self.reload = reload        # deletes and recreates db before start of loading data.
        self.testMode = testMode    # import one file, 100 records and return
        self.verbose = verbose      # prints status messages
        self.batchSize = batch      # number of rows to commit to db in one transation

        if type(path) != str:
            raise TypeError('path must be a string')

        if path[-1] != '/':
            path += '/'            # if path does not end with a backslash, add one

        self.path = path

        # open connection to the database
        super().__init__(path, reload, testMode, verbose)
        self.db_conn, self.db_cur = super().init_database(self.reload)
        
    def __del__(self):
        self.db_conn.close()