code: def test_named_arguments(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)
  
          for i, aggregated in enumerate(
              [
                  df.groupby("id").agg(
                      weighted_mean(df.v, w=df.w).alias("wm")
                  ),
                  df.groupby("id").agg(
                      weighted_mean(v=df.v, w=df.w).alias("wm")
                  ),
                  df.groupby("id").agg(
                      weighted_mean(w=df.w, v=df.v).alias("wm")
                  ),
                  self.spark.sql(
                      "SELECT id, weighted_mean(v, w => w) as wm FROM v GROUP BY id"
                  ),
                  self.spark.sql(
                      "SELECT id, weighted_mean(v => v, w => w) as wm FROM v GROUP BY id"
                  ),
                  self.spark.sql(
                      "SELECT id, weighted_mean(w => w, v => v) as wm FROM v GROUP BY id"
                  ),
              ]
          ):
              with self.subTest(query_no=i):
                  assertDataFrameEqual(
                      aggregated,
                      df.groupby("id").agg(mean(df.v).alias("wm")),
                  )
  
imports: import unittest
  from typing import cast
  from pyspark.rdd import PythonEvalType
  from pyspark.sql import Row
  from pyspark.sql.functions import array, explode, col, lit, mean, sum, udf, pandas_udf, PandasUDFType
  from pyspark.sql.types import ArrayType, YearMonthIntervalType
  from pyspark.errors import AnalysisException, PySparkNotImplementedError, PythonException
  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 25 for calling the GroupedAggPandasUDFTestsMixin obj's underlying member method code with example usage: obj.test_named_arguments() without return types