code: def safe_div(a, b):
      """Returns a if b is nil, else divides a by b.
  
      When scaling, sometimes a denominator might be nil. For instance, during standard scaling
      the denominator can be nil if a feature has no variance.
  
      """
      return a / b if b else 0.0
  
file_path: river/river/preprocessing/scale_target.py
imports: from __future__ import annotations
  import math
  from river import base, compose, stats
label_desc: Use image node_id 1 for calling a global function with example usage: safe_div(a, b) and returns: unknown