code: def test_named_arguments_negative(self):
      df = self.data
      weighted_mean = self.pandas_agg_weighted_mean_udf
  
      with self.tempView("v"):
          df.createOrReplaceTempView("v")
          self.spark.udf.register("weighted_mean", weighted_mean)
  
          base_sql = (
              "SELECT id, {func_call} OVER ({window_spec}) as wm FROM v"
          )
  
          for w in [
              "ROWS BETWEEN 2 PRECEDING AND 1 FOLLOWING",
              "ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING",
          ]:
              window_spec = f"PARTITION BY id ORDER BY v {w}"
              with self.subTest(window_spec=window_spec):
                  with self.assertRaisesRegex(
                      AnalysisException,
                      "DUPLICATE_ROUTINE_PARAMETER_ASSIGNMENT.DOUBLE_NAMED_ARGUMENT_REFERENCE",
                  ):
                      self.spark.sql(
                          base_sql.format(
                              func_call="weighted_mean(v => v, v => w)",
                              window_spec=window_spec,
                          )
                      ).show()
  
                  with self.assertRaisesRegex(
                      AnalysisException,
                      "UNEXPECTED_POSITIONAL_ARGUMENT",
                  ):
                      self.spark.sql(
                          base_sql.format(
                              func_call="weighted_mean(v => v, w)",
                              window_spec=window_spec,
                          )
                      ).show()
  
                  with self.assertRaisesRegex(
                      PythonException,
                      r"weighted_mean\(\) got an unexpected keyword argument 'x'",
                  ):
                      self.spark.sql(
                          base_sql.format(
                              func_call="weighted_mean(v => v, x => w)",
                              window_spec=window_spec,
                          )
                      ).show()
  
                  with self.assertRaisesRegex(
                      PythonException,
                      r"weighted_mean\(\) got multiple values for argument 'v'",
                  ):
                      self.spark.sql(
                          base_sql.format(
                              func_call="weighted_mean(v, v => w)",
                              window_spec=window_spec,
                          )
                      ).show()
  
imports: import unittest
  from typing import cast
  from pyspark.errors import AnalysisException, PythonException
  from pyspark.sql.functions import array, explode, col, lit, mean, min, max, rank, udf, pandas_udf, PandasUDFType
  from pyspark.sql.window import Window
  from pyspark.testing.sqlutils import ReusedSQLTestCase, have_pandas, have_pyarrow, pandas_requirement_message, pyarrow_requirement_message
  from pyspark.testing.utils import QuietTest, assertDataFrameEqual
label_desc: Use image node_id 34 for calling the WindowPandasUDFTestsMixin obj's underlying member method code with example usage: obj.test_named_arguments_negative() without return types