<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def record_service_agreement(storage_path, service_agreement_id, did, service_definition_id, price, files, start_time, status='pending'):
 """ Records the given pending service agreement. :param storage_path: storage path for the internal db, str :param service_agreement_id: :param did: DID, str :param service_definition_id: identifier of the service inside the asset DDO, str :param price: Asset price, int :param files: :param start_time: :param status: :return: """

    conn = sqlite3.connect(storage_path)
    try:
        cursor = conn.cursor()
        cursor.execute(
            '''CREATE TABLE IF NOT EXISTS service_agreements
               (id VARCHAR PRIMARY KEY, did VARCHAR, service_definition_id INTEGER, 
                price INTEGER, files VARCHAR, start_time INTEGER, status VARCHAR(10));'''
        )
        cursor.execute(
            'INSERT OR REPLACE INTO service_agreements VALUES (?,?,?,?,?,?,?)',
            [service_agreement_id, did, service_definition_id, price, files, start_time,
             status],
        )
        conn.commit()
    finally:
        conn.close()