code: def __init__(
      self,
      world_size: int,
      my_rank: int,
      batch_size: int,
      tasks: List[RecTaskInfo],
      compute_mode: RecComputeMode = RecComputeMode.UNFUSED_TASKS_COMPUTATION,
      window_size: int = 100,
      fused_update_limit: int = 0,
      process_group: Optional[dist.ProcessGroup] = None,
      **kwargs: Any,
  ) -> None:
      if compute_mode == RecComputeMode.FUSED_TASKS_COMPUTATION:
          raise RecMetricException(
              "Fused computation is not supported for recall session-level metrics"
          )
  
      if fused_update_limit > 0:
          raise RecMetricException(
              "Fused update is not supported for recall session-level metrics"
          )
      for task in tasks:
          if task.session_metric_def is None:
              raise RecMetricException(
                  "Please, specify the session metric definition"
              )
          session_metric_def = task.session_metric_def
          if session_metric_def.top_threshold is None:
              raise RecMetricException(
                  "Please, specify the top threshold"
              )
  
      super().__init__(
          world_size=world_size,
          my_rank=my_rank,
          batch_size=batch_size,
          tasks=tasks,
          compute_mode=compute_mode,
          window_size=window_size,
          fused_update_limit=fused_update_limit,
          process_group=process_group,
          **kwargs,
      )
  
imports: import logging
  from typing import Any, cast, Dict, List, Optional, Set, Type, Union
  import torch
  from torch import distributed
  from torchrec.metrics.metrics_config import RecTaskInfo, SessionMetricDef
  from torchrec.metrics.metrics_namespace import MetricName, MetricNamespace, MetricPrefix
  from torchrec.metrics.rec_metric import MetricComputationReport, RecComputeMode, RecMetric, RecMetricComputation, RecMetricException
label_desc: Use image node_id 1 to create a new RecallSessionMetric object from inherited base classes: RecMetric with example: obj = RecallSessionMetric(world_size, my_rank, batch_size, tasks, compute_mode, window_size, fused_update_limit, process_group)