code: def compute_ctr(
      ctr_num: torch.Tensor, ctr_denom: torch.Tensor
  ) -> torch.Tensor:
      return torch.where(
          ctr_denom == 0.0, 0.0, ctr_num / ctr_denom
      ).double()
  
file_path: torchrec/torchrec/metrics/ctr.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_ctr(ctr_num, ctr_denom) and returns: torch