code: def __init__(
      self,
      world_size: int,
      rec_tasks: List[RecTaskInfo],
      compute_lifetime_metric: bool = True,
      compute_window_metric: bool = True,
      local_compute_lifetime_metric: bool = True,
      local_compute_window_metric: bool = True,
  ) -> None:
      self.world_size = world_size
      self._rec_tasks = rec_tasks
      self._compute_lifetime_metric = compute_lifetime_metric
      self._compute_window_metric = compute_window_metric
      self._local_compute_lifetime_metric = (
          local_compute_lifetime_metric
      )
      self._local_compute_window_metric = local_compute_window_metric
  
imports: import abc
  import os
  import random
  import tempfile
  import uuid
  from typing import Any, Callable, Dict, List, Optional, Tuple, Type
  from unittest.mock import Mock, patch
  import torch
  import torch.distributed
  import torch.distributed.launcher
  from torchrec.metrics.auc import AUCMetric
  from torchrec.metrics.auprc import AUPRCMetric
  from torchrec.metrics.model_utils import parse_task_model_outputs
  from torchrec.metrics.rec_metric import RecComputeMode, RecMetric, RecTaskInfo
label_desc: Use image node_id 1 to create a new TestMetric object from inherited base classes: abc with example: obj = TestMetric(world_size, rec_tasks, compute_lifetime_metric, compute_window_metric, local_compute_lifetime_metric, local_compute_window_metric)