def METHOD_NAME(args, func=None):
    for arg in args:
        if isinstance(arg, (tuple, list)):
            yield tuple(METHOD_NAME(arg, func=func))
        else:
            if func is None:
                yield arg
            else:
                yield func(arg)