code: def test_run_query(self, mock_aggregate, metrics, public_keys):
      # Arrange
      spark = self._get_spark_session()
      if pipeline_dp.Metrics.SUM in metrics:
          mock_aggregate.return_value = spark.sparkContext.parallelize(
              [("key1", CountSumNamedTuple(1.2345, 2.34567))]
          )
      elif pipeline_dp.Metrics.MEAN in metrics:
          mock_aggregate.return_value = spark.sparkContext.parallelize(
              [("key1", CountMeanNamedTuple(1.2345, 2.34567))]
          )
      else:
          mock_aggregate.return_value = spark.sparkContext.parallelize(
              [("key1", CountNamedTuple(1.2345))]
          )
      df = spark.createDataFrame(get_pandas_df())
      value_column = (
          "value" if pipeline_dp.Metrics.SUM in metrics else None
      )
      columns = dataframes.Columns(
          "privacy_key", "group_key", value_column
      )
      metrics_dict = dict([(m, m.name) for m in metrics])
      min_value = max_value = None
      if (
          pipeline_dp.Metrics.SUM in metrics
          or pipeline_dp.Metrics.MEAN in metrics
      ):
          min_value, max_value = -5, 5
      bounds = dataframes.ContributionBounds(
          max_partitions_contributed=5,
          max_contributions_per_partition=2,
          min_value=min_value,
          max_value=max_value,
      )
      query = dataframes.Query(
          df, columns, metrics_dict, bounds, public_keys
      )
  
      # Act
      result = query.run_query(dataframes.Budget(1, 1e-10))
  
      # Assert
      expected_aggregate_params = pipeline_dp.AggregateParams(
          max_partitions_contributed=5,
          max_contributions_per_partition=2,
          min_value=min_value,
          max_value=max_value,
          metrics=metrics,
      )
      mock_aggregate.assert_called_once_with(
          mock.ANY,
          expected_aggregate_params,
          mock.ANY,
          public_partitions=public_keys,
      )
      df = result.toPandas()
      self.assertLen(df, 1)
      row = df.loc[0]
      self.assertEqual(row["group_key"], "key1")
      self.assertEqual(row["COUNT"], 1.2345)
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from collections import namedtuple
  import pandas
  from pyspark import sql
  from unittest import mock
  from unittest.mock import patch
  from pipeline_dp import dataframes
  import pipeline_dp
label_desc: Use image node_id 2 for calling the QueryTest obj's underlying member method code with example usage: obj.test_run_query(mock_aggregate, metrics, public_keys) without return types