@pipe.func<EOL>def subn(prev, pattern, repl, *args, **kw):
count = <NUM_LIT:0> if '<STR_LIT:count>' not in kw else kw.pop('<STR_LIT:count>')<EOL>pattern_obj = re.compile(pattern, *args, **kw)<EOL>for s in prev:<EOL><INDENT>yield pattern_obj.subn(repl, s, count=count)<EOL><DEDENT>
subn pipe is a wrapper of re.subn method.

    :param prev: The previous iterator of pipe.
    :type prev: Pipe
    :param pattern: The pattern string.
    :type pattern: str|unicode
    :param repl: Check repl argument in re.sub method.
    :type repl: str|unicode|callable