code: def execute(
      self,
      optimized_learner: BaseInferenceLearner,
      input_data: List[Tuple[Any, ...]],
      base_outputs_list: List[Tuple[Any, ...]],
      perf_loss_ths: float,
      metric_func: Callable = None,
      ys: List = None,
      aggregation_func: Callable = np.mean,
  ):
      metric_func = metric_func or compute_relative_difference
      relative_differences = []
      if ys is None:
          ys = [None] * len(input_data)
  
      assert len(input_data) == len(base_outputs_list) == len(ys), (
          "INTERNAL ASSERT FAILED: error during computation of precision "
          "of the optimized model, got wrong dimensions of the data. "
      )
  
      for inputs, base_outputs, y in zip(
          input_data, base_outputs_list, ys
      ):
          opt_outputs = optimized_learner(*inputs)
          relative_difference = max(
              metric_func(base_output, opt_output, y)
              for base_output, opt_output in zip(
                  base_outputs, opt_outputs
              )
          )
          relative_differences.append(relative_difference)
      relative_difference = aggregation_func(relative_differences)
      self.valid = relative_difference <= perf_loss_ths
      self.measure_result = relative_difference
  
file_path: nebuly/optimization/nebullvm/nebullvm/operations/measures/measures.py
imports: from typing import List, Tuple, Any, Callable, Dict
  import numpy
  from nebullvm.config import QUANTIZATION_DATA_NUM
  from nebullvm.core.models import BenchmarkOriginalModelResult, DeepLearningFramework
  from nebullvm.operations.inference_learners.base import BaseInferenceLearner
  from nebullvm.operations.measures.base import Measure
  from nebullvm.operations.measures.utils import compute_torch_latency, compute_tf_latency, compute_onnx_latency, compute_relative_difference
  from nebullvm.tools.data import DataManager
  from nebullvm.tools.onnx import run_onnx_model
  from nebullvm.tools.pytorch import run_torch_model
  from nebullvm.tools.tf import run_tf_model
label_desc: Use image node_id 2 for calling the MetricDropMeasure obj's underlying member method code with example usage: obj.execute(optimized_learner, input_data, base_outputs_list, perf_loss_ths, metric_func, ys, aggregation_func) without return types