class_docstr: This class implements the RecMetricComputation for Recall on session level.
  
  The constructor arguments are defined in RecMetricComputation.
  See the docstring of RecMetricComputation for more detail.
docstr: Args:
      predictions (torch.Tensor): tensor of size (n_task, n_examples)
      labels (torch.Tensor): tensor of size (n_task, n_examples)
      weights (torch.Tensor): tensor of size (n_task, n_examples)
      session (torch.Tensor): Optional tensor of size (n_task, n_examples) that specifies the groups of
              predictions/labels per batch.
docstr_tok: ["Args",":","predictions","(","torch.Tensor",")",":","tensor","of","size","(","n_task",",","n_examples",")","labels","(","torch.Tensor",")",":","tensor","of","size","(","n_task",",","n_examples",")","weights","(","torch.Tensor",")",":","tensor","of","size","(","n_task",",","n_examples",")","session","(","torch.Tensor",")",":","Optional","tensor","of","size","(","n_task",",","n_examples",")","that","specifies","the","groups","of","predictions\/labels","per","batch","."]
code: def update(
      self,
      *,
      predictions: Optional[torch.Tensor],
      labels: torch.Tensor,
      weights: Optional[torch.Tensor],
      **kwargs: Dict[str, Any],
  ) -> None:
      """
      Args:
          predictions (torch.Tensor): tensor of size (n_task, n_examples)
          labels (torch.Tensor): tensor of size (n_task, n_examples)
          weights (torch.Tensor): tensor of size (n_task, n_examples)
          session (torch.Tensor): Optional tensor of size (n_task, n_examples) that specifies the groups of
                  predictions/labels per batch.
      """
  
      if (
          "required_inputs" not in kwargs
          or self.session_var_name not in kwargs["required_inputs"]
      ):
          raise RecMetricException(
              "Need the {} input to update the session metric".format(
                  self.session_var_name
              )
          )
      # pyre-ignore
      session = kwargs["required_inputs"][self.session_var_name]
      if predictions is None or weights is None or session is None:
          raise RecMetricException(
              "Inputs 'predictions', 'weights' and 'session' should not be None for RecallSessionMetricComputation update"
          )
      _validate_model_outputs(labels, predictions, weights, session)
  
      predictions = predictions.double()
      labels = labels.double()
      weights = weights.double()
  
      num_samples = predictions.shape[-1]
      for state_name, state_value in self.get_recall_states(
          labels=labels,
          predictions=predictions,
          weights=weights,
          session=session,
      ).items():
          state = getattr(self, state_name)
          state += state_value
          self._aggregate_window_state(
              state_name, state_value, num_samples
          )
  
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 2 for calling the RecallSessionMetricComputation obj's underlying member method code with example usage: obj.update() without return types