<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def namedb_accounts_vest(cur, block_height):
 """ Vest tokens at this block to all recipients. Goes through the vesting table and debits each account that should vest on this block. """

    sql = 'SELECT * FROM account_vesting WHERE block_id = ?'
    args = (block_height,)

    vesting_rows = namedb_query_execute(cur, sql, args)
    rows = []
    for row in vesting_rows:
        tmp = {}
        tmp.update(row)
        rows.append(tmp)

    for row in rows:
        addr = row['address']
        token_type = row['type']
        token_amount = row['vesting_value']

        log.debug("Vest {} with {} {}".format(addr, token_amount, token_type))
        
        fake_txid = namedb_vesting_txid(addr, token_type, token_amount, block_height)

        res = namedb_account_credit(cur, addr, token_type, token_amount, block_height, 0, fake_txid)
        if not res:
            traceback.print_stack()
            log.fatal('Failed to vest {} {} to {}'.format(token_amount, token_type, addr))
            os.abort()

    return True