I think you don't need this block at the end of line. You can directly assign the search result to the nodes variable, right?