def METHOD_NAME(node, row):
    if row[node["index"]] < node["value"]:
        if isinstance(node["left"], dict):
            return METHOD_NAME(node["left"], row)
        else:
            return node["left"]
    else:
        if isinstance(node["right"], dict):
            return METHOD_NAME(node["right"], row)
        else:
            return node["right"]