def do(self, **kwargs):
<EOL>for k, v in list(six.iteritems(kwargs)):<EOL><INDENT>if k.startswith("<STR_LIT>") or k.startswith("<STR_LIT>") or k.startswith("<STR_LIT>"):<EOL><INDENT>self.commands.append({k: v})<EOL>del kwargs[k]<EOL><DEDENT><DEDENT>for k, v in sorted(six.iteritems(kwargs)):<EOL><INDENT>if k in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>self.commands.append({k: {"<STR_LIT>": v}})<EOL><DEDENT>else:<EOL><INDENT>self.commands.append({k: v})<EOL><DEDENT><DEDENT>return self<EOL>
Here for compatibility with legacy clients only - DO NOT USE!!!
This is sort of mix of "append" and "insert": it puts commands in the list,
with some half smarts about which commands go at the front or back.
If you add multiple commands to the back in one call, they will get added sorted by command name.
:param kwargs: the commands in key=val format
:return: the Action, so you can do Action(...).do(...).do(...)