async def insert(query):
assert isinstance(query, peewee.Insert),("<STR_LIT>"<EOL>"<STR_LIT>" % str(query))<EOL>cursor = await _execute_query_async(query)<EOL>try:<EOL><INDENT>if query._returning:<EOL><INDENT>row = await cursor.fetchone()<EOL>result = row[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>database = _query_db(query)<EOL>last_id = await database.last_insert_id_async(cursor)<EOL>result = last_id<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>await cursor.release()<EOL><DEDENT>return result<EOL>
Perform INSERT query asynchronously. Returns last insert ID.
    This function is called by object.create for single objects only.