code: def _calc_d1(s, x, sigma, b, t):
      return tf.math.divide_no_nan(
          tf.math.log(s / x) + (b + sigma**2 / 2) * t,
          sigma * tf.math.sqrt(t),
      )
  
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 4 for calling a global function with example usage: _calc_d1(s, x, sigma, b, t) and returns: tf