code: def _get_examples(self):
      # fixed_string used as query_id
      # fixed_float used as gain_key for NDCG
      # fixed_int used as weight_key for NDCG
      #
      # Query1 (weight=1): (p=0.8, g=0.5) (p=0.2, g=1.0)
      # Query2 (weight=2): (p=0.9, g=1.0) (p=0.5, g=0.5) (p=0.1, g=0.1)
      # Query3 (weight=3): (p=0.9, g=1.0)
      # DCG@1:  0.5, 1.0, 1.0
      # NDCG@1: 0.5, 1.0, 1.0
      # Average NDCG@1: (1 * 0.5 + 2 * 1.0 + 3 * 1.0) / (1 + 2 + 3)
      #               = 5.5 / 6.0
      #               ~ 0.917
      # Using log2(3.0) ~ 1.585 and hence 1 / log2(3.0) ~ 0.631
      # DCG@2: (0.5 + 0.631), (1.0 + 0.315), (1.0)
      # NDCG@2: (0.5 + 0.631) / (1.0 + 0.315), (1.0 + 0.315) / (1.0 + 0.315), 1.0
      # Average NDCG@2: (1 * 0.860 + 2 * 1.0 + 3 * 1.0) / (1 + 2 + 3)
      #               ~ 0.977
      query1_example1 = self._makeExample(
          prediction=0.2,
          label=1.0,
          fixed_float=1.0,
          fixed_string="query1",
          fixed_int=1,
      )
      query1_example2 = self._makeExample(
          prediction=0.8,
          label=0.0,
          fixed_float=0.5,
          fixed_string="query1",
          fixed_int=1,
      )
  
      query2_example1 = self._makeExample(
          prediction=0.5,
          label=0.0,
          fixed_float=0.5,
          fixed_string="query2",
          fixed_int=2,
      )
      query2_example2 = self._makeExample(
          prediction=0.9,
          label=1.0,
          fixed_float=1.0,
          fixed_string="query2",
          fixed_int=2,
      )
      query2_example3 = self._makeExample(
          prediction=0.1,
          label=0.0,
          fixed_float=0.1,
          fixed_string="query2",
          fixed_int=2,
      )
  
      query3_example1 = self._makeExample(
          prediction=0.9,
          label=1.0,
          fixed_float=1.0,
          fixed_string="query3",
          fixed_int=3,
      )
  
      serialized_examples = [
          query1_example1.SerializeToString(),
          query1_example2.SerializeToString(),
          query2_example1.SerializeToString(),
          query2_example2.SerializeToString(),
          query2_example3.SerializeToString(),
          query3_example1.SerializeToString(),
      ]
  
      return serialized_examples
  
imports: import os
  import apache_beam
  from apache_beam.testing import util
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import model_eval_lib
  from tensorflow_model_analysis.api import tfma_unit
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.eval_saved_model.example_trainers import fixed_prediction_estimator_extra_fields
  from tensorflow_model_analysis.evaluators import legacy_query_based_metrics_evaluator
  from tensorflow_model_analysis.evaluators.query_metrics import min_label_position
  from tensorflow_model_analysis.evaluators.query_metrics import ndcg
  from tensorflow_model_analysis.evaluators.query_metrics import query_statistics
  from tensorflow_model_analysis.extractors import legacy_predict_extractor
  from tensorflow_model_analysis.extractors import slice_key_extractor
label_desc: Use image node_id 3 for calling the QueryBasedMetricsEvaluatorTest obj's underlying member method code with example usage: obj._get_examples() and returns: serialized_examples