Example from spinalcordtoolbox/scripts/sct_run_batch.py
#!/usr/bin/env python
#
# Wrapper to processing scripts, which loops across subjects. Data should be
# organized according to the BIDS structure and the processing script should
# make use of the some of the environment variables passed here. More details
# at: https://spine-generic.readthedocs.io/en/latest/
#
# Copyright (c) 2020 Polytechnique Montreal <www.neuro.polymtl.ca>
# License: see the file LICENSE
Example from
spinalcordtoolbox/scripts/sct_run_batch.py