class_docstr: These test cases exercise the interface to the proto plan
  generation but do not call Spark.
class_docstr_tok: ["These","test","cases","exercise","the","interface","to","the","proto","plan","generation","but","do","not","call","Spark","."]
code: def test_to(self):
      # SPARK-41464: test `to` API in Python client.
      df = self.connect.readTable(table_name=self.tbl_name)
  
      schema = StructType(
          [
              StructField("col1", IntegerType(), True),
              StructField("col2", StringType(), True),
              StructField(
                  "map1",
                  MapType(StringType(), IntegerType(), True),
                  True,
              ),
              StructField(
                  "array1", ArrayType(IntegerType(), True), True
              ),
          ]
      )
      new_plan = df.to(schema)._plan.to_proto(self.connect)
      self.assertEqual(
          pyspark_types_to_proto_types(schema),
          new_plan.root.to_schema.schema,
      )
  
imports: import unittest
  import uuid
  import datetime
  import decimal
  import math
  from pyspark.testing.connectutils import PlanOnlyTestFixture, should_test_connect, connect_requirement_message
  from pyspark.errors import PySparkValueError
label_desc: Use image node_id 36 for calling the SparkConnectPlanTests obj's underlying member method code with example usage: obj.test_to() without return types