code: async def insert(query):
      
      assert isinstance(query, peewee.Insert),\
          ("Error, trying to run insert coroutine"
           "with wrong query class %s" % str(query))
  
      cursor = await _execute_query_async(query)
  
      try:
          if query._returning:
              row = await cursor.fetchone()
              result = row[0]
          else:
              database = _query_db(query)
              last_id = await database.last_insert_id_async(cursor)
              result = last_id
      finally:
          await cursor.release()
  
      return result
docs: Perform INSERT query asynchronously. Returns last insert ID.
      This function is called by object.create for single objects only.