code: def _get_quadratic_coeffs(
      normalized_prices,
      normalized_forwards,
      log_normalized_forwards,
      option_signs,
      polya_factor,
  ):
      """Computes the coefficients of the quadratic in Stefanica-Radiocic method.
  
      Computes the coefficients described in Table 3 in Ref [1].
  
      Args:
        normalized_prices: `Tensor` of real dtype and any shape. The prices of the
          options to be inverted. Normalization means that the raw price is divided
          by the strike discounted to the present.
        normalized_forwards: `Tensor` or same dtype and shape as `normalized_prices`
          The forwards divided by the strike of the options.
        log_normalized_forwards: `Tensor` or same dtype and shape as
          `normalized_prices`. Log of the normalized forwards.
        option_signs: Real `Tensor` of same shape and dtype as `normalized_prices`.
          Should be +1 for a Call option and -1 for a put option.
        polya_factor: Scalar `Tensor` of same dtype as `normalized_prices`. This is
          the factor to use for approximating the normal CDF in a Polya-like
          expression. Polya approximation is (here `k` is the `polya_factor`) N(x) ~
          0.5 + sign(x) sqrt(1-e^(-k x^2)) with k = 2 / pi. However, it has been
          found that other values for `k` may be more accurate. The value that
          minimizes the absolute error over the range [-10, 10] is 0.62305051
          (approximately 5/8).
  
      Returns:
        (A, B, ln(C)): A 3-tuple of coefficients in terms of which the approximate
          implied vol is calculated.
      """
      # Corresponds to expressions in Table 3 in Ref [1].
      # corresponds to (e^y - 1) = F/K - 1
      q1 = normalized_forwards - 1
      # corresponds to (e^y + 1) = F/K + 1
      q2 = normalized_forwards + 1
      # r here corresponds to R in the paper and not to the interest rate.
      r = 2 * normalized_prices - option_signs * q1
  
      # f1 is e^{-polya_factor * y}, f2 is e^{polya_factor * y}
      f1 = tf.math.pow(normalized_forwards, -polya_factor)
      f2 = 1 / f1
  
      # g1 is e^{(1-polya_factor) y}, g2 is e^{-(1-polya_factor) y}
      g1 = f1 * normalized_forwards
      g2 = 1 / g1
  
      # a corresponds to the coefficient A in the paper.
      a = tf.math.square(g1 - g2)
  
      # b corresponds to the coefficient B in the paper.
      h = tf.math.square(normalized_forwards)
      r2 = tf.math.square(r)
      b = (
          4 * (f1 + f2)
          - 2 * (g1 + g2) * (1 + h - r2) / normalized_forwards
      )
  
      # lnc corresponds to the logarithm of C in the paper,
      # handled here on the log scale to minimize numerical instability.
      lnc1 = tf.math.log(4.0 * normalized_prices) + tf.math.log(
          normalized_prices - option_signs * q1
      )
      lnc2 = tf.math.log(q2 - r) + tf.math.log(q2 + r)
      lnc = lnc1 + lnc2 - 2.0 * log_normalized_forwards
  
      return a, b, lnc
  
imports: import numpy
  import tensorflow.compat.v2
label_desc: Use image node_id 4 for calling a global function with example usage: _get_quadratic_coeffs(normalized_prices, normalized_forwards, log_normalized_forwards, option_signs, polya_factor) and returns: a,  b,  lnc