code: def test_insert_into(self):
      df = self.spark.createDataFrame(
          [("a", 1), ("b", 2)], ["C1", "C2"]
      )
      with self.table("test_table"):
          df.write.saveAsTable("test_table")
          self.assertEqual(
              2, self.spark.sql("select * from test_table").count()
          )
  
          df.write.insertInto("test_table")
          self.assertEqual(
              4, self.spark.sql("select * from test_table").count()
          )
  
          df.write.mode("overwrite").insertInto("test_table")
          self.assertEqual(
              2, self.spark.sql("select * from test_table").count()
          )
  
          df.write.insertInto("test_table", True)
          self.assertEqual(
              2, self.spark.sql("select * from test_table").count()
          )
  
          df.write.insertInto("test_table", False)
          self.assertEqual(
              4, self.spark.sql("select * from test_table").count()
          )
  
          df.write.mode("overwrite").insertInto("test_table", False)
          self.assertEqual(
              6, self.spark.sql("select * from test_table").count()
          )
  
imports: import os
  import shutil
  import tempfile
  from pyspark.errors import AnalysisException
  from pyspark.sql.functions import col
  from pyspark.sql.readwriter import DataFrameWriterV2
  from pyspark.sql.types import StructType, StructField, StringType
  from pyspark.testing.sqlutils import ReusedSQLTestCase
label_desc: Use image node_id 4 for calling the ReadwriterTestsMixin obj's underlying member method code with example usage: obj.test_insert_into() without return types