code: def _discretize_boundary_conditions(dx0, dx1, alpha, beta, gamma):
      """Discretizes boundary conditions."""
      # Converts a boundary condition given as alpha V + beta V_n = gamma,
      # where V_n is the derivative w.r.t. the normal to the boundary into
      # v0 = xi1 v1 + xi2 v2 + eta,
      # where v0 is the value on the boundary point of the grid, v1 and v2 - values
      # on the next two points on the grid.
      # The expressions are exactly the same for both boundaries.
  
      if beta is None:
          # Dirichlet condition.
          if alpha is None:
              raise ValueError(
                  "Invalid boundary conditions: alpha and beta can't both be None."
              )
          zeros = tf.zeros_like(gamma)
          return zeros, zeros, gamma / alpha
  
      denom = beta * dx1 * (2 * dx0 + dx1)
      if alpha is not None:
          denom += alpha * dx0 * dx1 * (dx0 + dx1)
      xi1 = beta * (dx0 + dx1) * (dx0 + dx1) / denom
      xi2 = -beta * dx0 * dx0 / denom
      eta = gamma * dx0 * dx1 * (dx0 + dx1) / denom
      return xi1, xi2, eta
  
file_path: tf-quant-finance/tf_quant_finance/math/pde/steppers/parabolic_equation_stepper.py
imports: import tensorflow.compat.v2
  from tf_quant_finance import utils
label_desc: Use image node_id 10 for calling a global function with example usage: _discretize_boundary_conditions(dx0, dx1, alpha, beta, gamma) and returns: xi1,  xi2,  eta, zeros,  zeros,  unknown