@staticmethod<EOL><INDENT>def _mode_comment_convert(commands):<DEDENT>
ret = []<EOL>comment_count = <NUM_LIT:0><EOL>for idx, element in enumerate(commands):<EOL><INDENT>if isinstance(element, py23_compat.string_types) and element.startswith(<EOL>"<STR_LIT>"<EOL>):<EOL><INDENT>comment_count += <NUM_LIT:1><EOL>continue<EOL><DEDENT>else:<EOL><INDENT>if comment_count > <NUM_LIT:0>:<EOL><INDENT>ret.append(<EOL>{<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT:input>": "<STR_LIT:\n>".join(<EOL>map(<EOL>lambda s: s.lstrip("<STR_LIT>"),<EOL>commands[idx - comment_count : idx],<EOL>)<EOL>),<EOL>}<EOL>)<EOL>comment_count = <NUM_LIT:0><EOL><DEDENT>ret.append(element)<EOL><DEDENT><DEDENT>return ret<EOL>
EOS has the concept of multi-line mode comments, shown in the running-config
as being inside a config stanza (router bgp, ACL definition, etc) and beginning
with the normal level of spaces and '!!', followed by comments.

Unfortunately, pyeapi does not accept mode comments in this format, and have to be
converted to a specific type of pyeapi call that accepts multi-line input

Copy the config list into a new return list, converting consecutive lines starting with
"!!" into a single multiline comment command

:param commands: List of commands to be sent to pyeapi
:return: Converted list of commands to be sent to pyeapi