def create(self, comment, mentions=()):
data = {<EOL>"<STR_LIT>": self.app_id,<EOL>"<STR_LIT>": self.record_id,<EOL>"<STR_LIT>": {<EOL>"<STR_LIT:text>": comment,<EOL>}<EOL>}<EOL>if len(mentions) > <NUM_LIT:0>:<EOL><INDENT>_mentions = []<EOL>for m in mentions:<EOL><INDENT>if isinstance(m, (list, tuple)):<EOL><INDENT>if len(m) == <NUM_LIT:2>:<EOL><INDENT>_mentions.append({<EOL>"<STR_LIT:code>": m[<NUM_LIT:0>],<EOL>"<STR_LIT:type>": m[<NUM_LIT:1>]<EOL>})<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>")<EOL><DEDENT><DEDENT>elif isinstance(m, Mention):<EOL><INDENT>_mentions.append(m.serialize())<EOL><DEDENT><DEDENT>data["<STR_LIT>"]["<STR_LIT>"] = _mentions<EOL><DEDENT>resp = self._request("<STR_LIT:POST>", self._url, data)<EOL>r = cr.CreateCommentResult(resp)<EOL>return r<EOL>
create comment
:param comment:
:param mentions: list of pair of code and type("USER", "GROUP", and so on)
:return: