*(cf my comment on line 64)*
Here, I would remove the ``modules`` parameter and replace it with a variable taking its value from the data model directly.