def METHOD_NAME(metafunc):
    """pytest hook called for all detected test functions."""
    mark = metafunc.definition.get_closest_marker('indirect_parametrize')
    if not mark:
        return
    args, kwargs = mark.args[0](*mark.args[1:], **mark.kwargs)
    metafunc.parametrize(*args, **kwargs)