fromhera.workflowsimportDAG,Workflow,script@script()defflip():importrandomresult="heads"ifrandom.randint(0,1)==0else"tails"print(result)@script()defheads():print("it was heads")@script()deftails():print("it was tails")withWorkflow(generate_name="coinflip-",entrypoint="d")asw:withDAG(name="d")ass:f=flip()heads().on_other_result(f,"heads")tails().on_other_result(f,"tails")