fromhera.sharedimportglobal_configfromhera.workflowsimportInput,Workflowglobal_config.experimental_features["decorator_syntax"]=Truew=Workflow(generate_name="fanout-workflow-",)classPrintMessageInput(Input):message:str=""an_int:int=42@w.script()defprint_message(inputs:PrintMessageInput):print(inputs.message)@w.script()defprint_int(inputs:PrintMessageInput):print(inputs.an_int)@w.set_entrypoint@w.steps()defloop_example():print_message(PrintMessageInput(message="{{item}}"),name="print-str-message-loop-with-items",with_items=["hello world","goodbye world"],)# For general use of loops in decorator functions, you will need to# use `.construct` to pass the `"{{item}}"` string.print_int(PrintMessageInput.construct(an_int="{{item}}"),name="print-int-loop-with-items",with_items=[42,123,321],)