<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def variable_outfile_iterator(outfiles, infiles, arggroups, engine):
 """Iterate over variable output file name template."""

    assert len(outfiles) == 1

    template = engine(outfiles[0], tolerant=False)

    for infile in infiles:
        properties = make_path_properties(infile, prefix='')

        for arggroup in arggroups:
            outfile = template.apply(dict(arggroup, **properties))
            yield (outfile, infile, arggroup)