code: def test_create_insert(self, mock_handler):
      self.set_handler(
          mock_handler, name="pg", tables={"tasks": self.df}
      )
  
      self.set_predictor(self.task_predictor)
      sql = """
                 insert into pg.table1
                 (
                         SELECT model.a as a, model.b as b, model.p as c
                           FROM pg.tasks as t
                          JOIN mindsdb.task_model as model
                          WHERE t.a=1
                )
             """
  
      self.execute(sql)
  
      calls = mock_handler().query.call_args_list
  
      render = SqlalchemyRender("postgres")
  
      def to_str(query):
          s = render.get_string(query)
          s = (
              s.strip()
              .replace("\n", " ")
              .replace("\t", "")
              .replace("  ", " ")
          )
          return s
  
      # select for predictor
      assert (
          to_str(calls[0][0][0])
          == "SELECT * FROM tasks AS t WHERE t.a = 1"
      )
  
      # load table
      assert (
          to_str(calls[1][0][0])
          == "INSERT INTO table1 (a, b, c) VALUES (1, 'aaa', 'ccc'), (1, 'ccc', 'ccc')"
      )
  
      assert len(calls) == 2
  
imports: from unittest.mock import patch
  import datetime
  import tempfile
  import pytest
  import pandas
  import numpy
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb.api.executor.utilities.sql import query_df
  from mindsdb.api.mysql.mysql_proxy.utilities.lightwood_dtype import dtype
  from .executor_test_base import BaseExecutorMockPredictor
label_desc: Use image node_id 6 for calling the TestComplexQueries obj's underlying member method code with example usage: obj.test_create_insert(mock_handler) and returns: s