def build_cases(
    configs: list[str],
    modules: list[str],
    marks: Marks = (),
) -> list[ParameterSet]:
    """Produces the cartesian product of the configs and modules, optionally with marks."""

    return [pytest.param(config, module, marks=marks) for config in configs for module in modules]
Produces the cartesian product of the configs and modules, optionally with marks.
tests/mypy/test_mypy.py