code: def _prf_divide(numerator, denominator):
      """Performs division and handles divide-by-zero.
  
      On zero-division, sets the corresponding result elements to zero.
      """
      result = numerator / denominator
      mask = denominator == 0.0
      if not mask.any():
          return result
  
      # remove nan
      result[mask] = 0.0
      return result
  
imports: import warnings
  from typing import List, Optional, Tuple, Union
  import torch
  from poutyne.framework.metrics.base import Metric
  from poutyne.framework.metrics.metrics_registering import register_metric_class
  from poutyne.framework.metrics.predefined.bincount import _bincount
  from poutyne.utils import set_deterministic_debug_mode
label_desc: Use image node_id 1 for calling a global function with example usage: _prf_divide(numerator, denominator) and returns: result, result