code: def check_partitioning_functions(self, tpe):
      import datetime
      from pyspark.sql.functions.partitioning import (
          years,
          months,
          days,
          hours,
          bucket,
      )
  
      df = self.spark.createDataFrame(
          [(1, datetime.datetime(2000, 1, 1), "foo")],
          ("id", "ts", "value"),
      )
  
      writer = df.writeTo("testcat.t")
  
      self.assertIsInstance(writer.partitionedBy(years("ts")), tpe)
      self.assertIsInstance(writer.partitionedBy(months("ts")), tpe)
      self.assertIsInstance(writer.partitionedBy(days("ts")), tpe)
      self.assertIsInstance(writer.partitionedBy(hours("ts")), tpe)
      self.assertIsInstance(writer.partitionedBy(bucket(11, "id")), tpe)
      self.assertIsInstance(
          writer.partitionedBy(bucket(11, col("id"))), tpe
      )
      self.assertIsInstance(
          writer.partitionedBy(bucket(3, "id"), hours(col("ts"))), tpe
      )
  
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 ReadwriterV2TestsMixin obj's underlying member method code with example usage: obj.check_partitioning_functions(tpe) without return types