kwargs.get("nodes", []) and then you'll not need "if" below