def _check_substep(step, step_num, mrc):
    """Raise :py:class:`NotImplementedError` if the given substep
    (e.g. ``'mapper'``) runs subprocesses."""
    substep = step.get(mrc)
    if not substep:
        return
    if substep.get('type') != 'script':
        raise NotImplementedError("step %d's %s has unexpected type: %r" %
            (step_num, mrc, substep.get('type')))
    if substep.get('pre_filter'):
        raise NotImplementedError(
            "step %d's %s has pre-filter, which is unsupported" % (step_num,
            mrc))
