Is your feature request related to a problem? Please describe.
The generate_script function should be refactored to be more modular: https://github.com/ecmwf/pyflow/blob/develop/pyflow/nodes.py#L1412
Describe the solution you'd like
A nice improvement could be to put all the header into an include to hide the redundant information from user (most of the header is the same for all tasks).
Describe alternatives you've considered
No response
Additional context
No response
Organisation
No response