def function():
res = get_nodes(api_server_call, token)
newnode = ""
#endTime = ""
for node in res:
if (node['state'] == "booting" or node['state'] == "queued"):
newnode = node['name']
print("new node is : " + newnode)
return newnode
if(newnode == ""):
function()
new_node = function() >this is main function from where above function is called
print(new_node)
上面的函数返回我正在启动或排队的新节点我正在打印它,但在返回时它返回无