def METHOD_NAME(w3, owner, tokens, expected_tokens):
    uri = 'https://api.etherscan.io/api?module=logs&action=getLogs&fromBlock=10147630'
    uri += '&address=0xd07dc4262bcdbf85190c01c996b4c06a461d2430'
    uri += '&topic0=0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62'
    uri += '&topic2=%s' % owner
    uri += '&apikey=<>'
    data = json.loads(requests.get(uri).text)
    transactions = data['result']
    if len(transactions) > 0:
        assert len(transactions) < 1000, owner
        for transaction in transactions:
            tx_hash = transaction['transactionHash']
            w3, transferred_tokens = handle_transferring_transaction(w3, tx_hash)
            for token, qty in transferred_tokens.items():
                if token in tokens:
                    tokens[token] -= qty
    for token, qty in tokens.items():
        assert token in expected_tokens, '%s: %s not in %s' % (owner, token, expected_tokens)
        assert qty == expected_tokens[token], '%s: %s: %s != %s' % (owner, token, qty, expected_tokens[token])