class_docstr: Merges consecutive tokens with the same token type in the output
  stream of a lexer.
  
  .. versionadded:: 1.2
class_docstr_tok: ["Merges","consecutive","tokens","with","the","same","token","type","in","the","output","stream","of","a","lexer",".","..","versionadded",":",":","1.2"]
code: def filter(self, lexer, stream):
      current_type = None
      current_value = None
      for ttype, value in stream:
          if ttype is current_type:
              current_value += value
          else:
              if current_type is not None:
                  yield current_type, current_value
              current_type = ttype
              current_value = value
      if current_type is not None:
          yield current_type, current_value
  
imports: import re
  from pygments.token import String, Comment, Keyword, Name, Error, Whitespace, string_to_tokentype
  from pygments.filter import Filter
  from pygments.util import get_list_opt, get_int_opt, get_bool_opt, get_choice_opt, ClassNotFound, OptionError, text_type, string_types
  from pygments.plugin import find_plugin_filters
label_desc: Use image node_id 2 for calling the TokenMergeFilter obj's underlying member method code with example usage: obj.filter(lexer, stream) without return types