code: def xidz(numerator, denominator, value_if_denom_is_zero):
      
      small = 1e-6  # What is considered zero according to Vensim Help
      if abs(denominator) < small:
          return value_if_denom_is_zero
      else:
          return numerator * 1.0 / denominator
docs: Implements Vensim's XIDZ function.
      This function executes a division, robust to denominator being zero.
      In the case of zero denominator, the final argument is returned.
  
      Parameters
      ----------
      numerator: float
      denominator: float
          Components of the division operation
      value_if_denom_is_zero: float
          The value to return if the denominator is zero
  
      Returns
      -------
      numerator / denominator if denominator > 1e-6
      otherwise, returns value_if_denom_is_zero