#NEWLINE# def frame_parser( version = None , kind = 0 , extensions = None , protocols = None , pyparser = False ) : #NEWLINE# #INDENT# 'Create a new :class:`FrameParser` instance.\n\n    :param version: protocol version, the default is 13\n    :param kind: the kind of parser, and integer between 0 and 3 (check the\n        :class:`FrameParser` documentation for details)\n    :param extensions: not used at the moment\n    :param protocols: not used at the moment\n    :param pyparser: if ``True`` (default ``False``) uses the python frame\n        parser implementation rather than the much faster cython\n        implementation.\n    ' #NEWLINE# version = get_version ( version ) #NEWLINE# Parser = ( FrameParser if pyparser else CFrameParser ) #NEWLINE# return Parser ( Parser , kind , ProtocolError , close_codes = CLOSE_CODES )