def _rewrite_insert(self, sql, params, return_id=False):
returning = self.qn(self.query.model._meta.pk.attname) if return_id else '<STR_LIT:*>'<EOL>if self.query.conflict_action.value == '<STR_LIT>':<EOL><INDENT>return self._rewrite_insert_update(sql, params, returning)<EOL><DEDENT>elif self.query.conflict_action.value == '<STR_LIT>':<EOL><INDENT>return self._rewrite_insert_nothing(sql, params, returning)<EOL><DEDENT>raise SuspiciousOperation((<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>) % str(self.query.conflict_action))<EOL>
Rewrites a formed SQL INSERT query to include
        the ON CONFLICT clause.

        Arguments:
            sql:
                The SQL INSERT query to rewrite.

            params:
                The parameters passed to the query.

            returning:
                What to put in the `RETURNING` clause
                of the resulting query.

        Returns:
            A tuple of the rewritten SQL query and new params.