code: def test_mtml_empty_update(self) -> None:
      warmup_steps = 2
      extra_steps = 2
      batch_size = 128
      task_names = ["t1", "t2"]
      tasks = gen_test_tasks(task_names)
      qps = TowerQPSMetric(
          world_size=1,
          my_rank=0,
          batch_size=batch_size,
          tasks=tasks,
          warmup_steps=warmup_steps,
          compute_on_all_ranks=False,
          should_validate_update=False,
          window_size=200,
      )
      for step in range(warmup_steps + extra_steps):
          _model_output = [
              gen_test_batch(
                  label_name=task.label_name,
                  prediction_name=task.prediction_name,
                  weight_name=task.weight_name,
                  batch_size=batch_size,
              )
              for task in tasks
          ]
          model_output = {
              k: v for d in _model_output for k, v in d.items()
          }
          labels, predictions, weights, _ = parse_task_model_outputs(
              tasks, model_output
          )
          if step % 2 == 0:
              del labels["t1"]
          else:
              del labels["t2"]
          qps.update(
              predictions=predictions, labels=labels, weights=weights
          )
          self.assertEquals(
              qps._metrics_computations[0].num_examples,
              (step + 1) // 2 * batch_size,
          )
          self.assertEquals(
              qps._metrics_computations[1].num_examples,
              (step + 2) // 2 * batch_size,
          )
  
imports: import unittest
  from functools import partial, update_wrapper
  from typing import Callable, Dict, List, Optional, Tuple, Type
  import torch
  import torch.distributed
  from torchrec.metrics.metrics_config import DefaultTaskInfo
  from torchrec.metrics.model_utils import parse_task_model_outputs
  from torchrec.metrics.rec_metric import RecComputeMode, RecMetric, RecTaskInfo
  from torchrec.metrics.test_utils import gen_test_batch, gen_test_tasks, metric_test_helper, rec_metric_value_test_launcher, TestMetric
  from torchrec.metrics.tower_qps import TowerQPSMetric
label_desc: Use image node_id 7 for calling the TowerQPSMetricTest obj's underlying member method code with example usage: obj.test_mtml_empty_update() without return types