code: def compute_calibration(
      calibration_num: torch.Tensor, calibration_denom: torch.Tensor
  ) -> torch.Tensor:
      return torch.where(
          calibration_denom <= 0.0,
          0.0,
          calibration_num / calibration_denom,
      ).double()
  
file_path: torchrec/torchrec/metrics/calibration.py
imports: from typing import Any, cast, Dict, List, Optional, Type
  import torch
  from torchrec.metrics.metrics_namespace import MetricName, MetricNamespace, MetricPrefix
  from torchrec.metrics.rec_metric import MetricComputationReport, RecMetric, RecMetricComputation, RecMetricException
label_desc: Use image node_id 1 for calling a global function with example usage: compute_calibration(calibration_num, calibration_denom) and returns: torch