code: def _psi_2002(s, t, gamma, h, x2, x1, t1, r, b, sigma):
      """Compute the psi function."""
  
      d1 = -(
          tf.math.log(s / x1) + (b + (gamma - 0.5) * sigma**2) * t1
      ) / (sigma * tf.math.sqrt(t1))
      d2 = -(
          tf.math.log(x2**2 / (s * x1))
          + (b + (gamma - 0.5) * sigma**2) * t1
      ) / (sigma * tf.math.sqrt(t1))
      d3 = -(
          tf.math.log(s / x1) - (b + (gamma - 0.5) * sigma**2) * t1
      ) / (sigma * tf.math.sqrt(t1))
      d4 = -(
          tf.math.log(x2**2 / (s * x1))
          - (b + (gamma - 0.5) * sigma**2) * t1
      ) / (sigma * tf.math.sqrt(t1))
      f1 = -(
          tf.math.log(s / h) + (b + (gamma - 0.5) * sigma**2) * t
      ) / (sigma * tf.math.sqrt(t))
      f2 = -(
          tf.math.log(x2**2 / (s * h))
          + (b + (gamma - 0.5) * sigma**2) * t
      ) / (sigma * tf.math.sqrt(t))
      f3 = -(
          tf.math.log(x1**2 / (s * h))
          + (b + (gamma - 0.5) * sigma**2) * t
      ) / (sigma * tf.math.sqrt(t))
      f4 = -(
          tf.math.log((s * x1**2) / (h * x2**2))
          + (b + (gamma - 0.5) * sigma**2) * t
      ) / (sigma * tf.math.sqrt(t))
  
      kappa = (2 * b) / sigma**2 + (2 * gamma - 1)
      lambd = -r + gamma * b + 0.5 * gamma * (gamma - 1) * sigma**2
  
      return (
          tf.math.exp(lambd * t)
          * s**gamma
          * (
              _cbnd(d1, f1, tf.math.sqrt(t1 / t))
              - (x2 / s) ** kappa * _cbnd(d2, f2, tf.math.sqrt(t1 / t))
              - (x1 / s) ** kappa * _cbnd(d3, f3, -tf.math.sqrt(t1 / t))
              + (x1 / x2) ** kappa
              * _cbnd(d4, f4, -tf.math.sqrt(t1 / 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 8 for calling a global function with example usage: _psi_2002(s, t, gamma, h, x2, x1, t1, r, b, sigma) and returns: unknown