def remove_docstrings(tokens):
prev_tok_type = None<EOL>for index, tok in enumerate(tokens):<EOL><INDENT>token_type = tok[<NUM_LIT:0>]<EOL>if token_type == tokenize.STRING:<EOL><INDENT>if prev_tok_type == tokenize.INDENT:<EOL><INDENT>tokens[index][<NUM_LIT:1>] = '<STR_LIT>' <EOL>tokens[index-<NUM_LIT:1>][<NUM_LIT:1>] = '<STR_LIT>'<EOL>tokens[index-<NUM_LIT:2>][<NUM_LIT:1>] = '<STR_LIT>'<EOL><DEDENT>elif prev_tok_type == tokenize.NL:<EOL><INDENT>if tokens[index+<NUM_LIT:1>][<NUM_LIT:0>] == tokenize.NEWLINE:<EOL><INDENT>tokens[index][<NUM_LIT:1>] = '<STR_LIT>'<EOL>tokens[index+<NUM_LIT:1>][<NUM_LIT:1>] = '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT>prev_tok_type = token_type<EOL><DEDENT>
Removes docstrings from *tokens* which is expected to be a list equivalent
of `tokenize.generate_tokens()` (so we can update in-place).