code: def _calc_q(n, m, sign, k=1):
      return (
          (1 - n)
          + sign
          * tf.math.sqrt((n - 1) ** 2 + tf.math.divide_no_nan(4 * m, k))
      ) / 2
  
imports: from typing import Tuple
  import numpy
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance.black_scholes import vanilla_prices
  from tf_quant_finance.math import gradient
  from tf_quant_finance.math import integration
  from tf_quant_finance.math.root_search import newton
label_desc: Use image node_id 5 for calling a global function with example usage: _calc_q(n, m, sign, k) and returns: unknown