def METHOD_NAME():
    """
    need to be able to load an existing db file and make changes to it,
    and preserve the pretty printing
    """
    f_db = 'db_test.json'
    # load the db this way so the pretty formatting isn't changed
    cal_db = db.TinyDB(storage=MemoryStorage)
    with open(f_db) as f:
        raw_db = json.load(f)
        cal_db.storage.write(raw_db)
    query = db.Query()
    # example 1
    # update file_info with a new field
    tb_info = cal_db.table('_file_info')
    now = datetime.utcnow().strftime("%m/%d/%Y, %H:%M:%S")
    # tb_info.insert({'updated_gmt':now})
    tb_info.upsert({'updated_gmt':now}, query['updated_gmt'])
    # example 2
    # overwrite part of a calibration table using upsert
    tb_ecal = cal_db.table('energy_cal')
    for i in range(3):
        row = {'_run':f'{i:0>4d}', 'a':i+20, 'b':i/10, 'c':i*42,
               'tscov':int(time.time() + i*60)}
        tb_ecal.upsert(row, query['_run'] == f'{i:0>4d}') 
        # tb_ecal.upsert(row, query.idx == i) 
    # show in-memory state
    # pprint(cal_db.storage.read())
    # write to file
    write_pretty(cal_db.storage.read(), f_db)
    # show the file as-is on disk
    with open(f_db) as f:
        print(f.read()) 