def METHOD_NAME(self, node, tx, index):
    change_index = None
    for vout in tx["vout"]:
        info = node.getaddressinfo(vout["scriptPubKey"]["address"])
        if (info["ismine"] and info["ischange"]):
            change_index = int(re.findall(r'\d+', info["hdkeypath"])[-1])
            break
    assert_equal(change_index, index)