import logging async def filter(completeMessage, todo): m = completeMessage todo.append( { "action": "map", "data": { "onodeID": m["data"]["onodeID"], "mnodeID": m["data"]["mnodeID"], }, } ) todo.append( { "action": "initNodeDH", "data": {"mnodeID": m["data"]["mnodeID"], "onodeID": m["data"]["onodeID"]}, } )