I have written this function to insert data as batch but while adding labels I am getting BindError: Local entity is not bound to a remote entity.
def bulkInsertNodes(n=1000):
graph = Graph()
btch = WriteBatch(graph)
nodesList = []
for i in range(1,n+1):
temp = Node(id = str(i))
nodesList.append(temp)
btch.create(temp)
btch.run()
btch = WriteBatch(graph)
for n in nodesList:
btch.add_labels(n,"Person")
btch.run()