code: def _apply_default_lower_boundary(
      subdiag,
      diag,
      superdiag,
      inner_first_order_coeff,
      first_order_coeff,
      delta,
      lower_trim_indices,
      upper_trim_indices,
      batch_rank,
      dim,
  ):
      """Update discretization matrix for default lower boundary conditions."""
      # TODO(b/185337444): Use second order discretization for the boundary points
      # Here we append '-b(t, x_min) * (B(t, x_min) * V(t, x_min)) / delta' to
      # diagonal and
      # 'b(t, x_min) * (B(t, x_min + delta) * V(t, x_min + delta)) / delta' to
      # superdiagonal
      zeros = tf.zeros_like(diag)
      ones = tf.ones_like(diag)
      # Update superdiag
      if inner_first_order_coeff is None:
          # Set to ones, if inner coefficient is not supplied
          inner_coeff = ones
      else:
          inner_coeff = _trim_boundaries(
              inner_first_order_coeff,
              from_dim=batch_rank,
              lower_trim_indices=lower_trim_indices,
              upper_trim_indices=upper_trim_indices,
          )
      if first_order_coeff is None:
          if inner_first_order_coeff is None:
              # Corresponds to zero value of B(t, x_min)
              extra_first_order_coeff = _slice(
                  zeros, batch_rank + dim, 0, 1
              )
          else:
              extra_first_order_coeff = _slice(
                  ones, batch_rank + dim, 0, 1
              )
      else:
          first_order_coeff = _trim_boundaries(
              first_order_coeff,
              from_dim=batch_rank,
              lower_trim_indices=lower_trim_indices,
              upper_trim_indices=upper_trim_indices,
          )
          extra_first_order_coeff = _slice(
              first_order_coeff, batch_rank + dim, 0, 1
          )
      inner_coeff_next = _slice(inner_coeff, batch_rank + dim, 1, 2)
      extra_superdiag_coeff = (
          inner_coeff_next * extra_first_order_coeff / delta
      )
      # Minus is due to moving to rhs.
      superdiag = _append_first(
          -extra_superdiag_coeff, superdiag, axis=batch_rank + dim
      )
      # Update diagonal
      inner_coeff_boundary = _slice(inner_coeff, batch_rank + dim, 0, 1)
      extra_diag_coeff = (
          -inner_coeff_boundary * extra_first_order_coeff / delta
      )
      # Minus is due to moving to rhs.
      diag = _append_first(
          -extra_diag_coeff, diag, axis=batch_rank + dim
      )
      # Update subdiagonal
      subdiag = _append_first(
          tf.zeros_like(extra_diag_coeff),
          subdiag,
          axis=batch_rank + dim,
      )
      return subdiag, diag, superdiag
  
imports: import tensorflow.compat.v2
  from tf_quant_finance import utils
label_desc: Use image node_id 6 for calling a global function with example usage: _apply_default_lower_boundary(subdiag, diag, superdiag, inner_first_order_coeff, first_order_coeff, delta, lower_trim_indices, upper_trim_indices, batch_rank, dim) and returns: subdiag,  diag,  superdiag