code: def standard_normal_cdf(a):
      # Based on the SciPy implementation:
      # https://github.com/scipy/scipy/blob/ac729b8f96a018b9156a0e5679e18b5d6e2e70a7/scipy/special/cephes/ndtr.c#L201
      x = a / _SQRT_2
      z = tf.cast(tf.math.abs(x), dtype=tf.float64)
      y1 = 0.5 + 0.5 * tf.math.erf(x)
      y2 = 0.5 * tf.math.erfc(z)
      y3 = 1 - y2
      return tf.where(z < (_SQRT_2 / 2), y1, tf.where(x > 0, y3, y2))
  
file_path: tf-quant-finance/tf_quant_finance/experimental/american_option_pricing/common.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tf_quant_finance import types
label_desc: Use image node_id 1 for calling a global function with example usage: standard_normal_cdf(a) and returns: tf