code: def _secant_step(x1, x2, y1, y2):
      """Returns the step size at the current position if using the secant method.
  
      This function is meant for exclusive use by the `_brent_loop_body` function:
      - It does not guard against divisions by zero, and instead assumes that `y1`
        is distinct from `y2`. The `_brent_loop_body` function guarantees this
        property.
      - It does not guard against overflows which may occur if the difference
        between `y1` and `y2` is small while that between `x1` and `x2` is not.
        In this case, the resulting step size will be larger than `bisection_step`
        and thus ignored by the `_brent_loop_body` function.
  
      Args:
        x1: `Tensor` containing the current position.
        x2: `Tensor` containing the previous position.
        y1: `Tensor` containing the value of `objective_fn` at `x1`.
        y2: `Tensor` containing the value of `objective_fn` at `x2`.
  
      Returns:
        A `Tensor` with the same shape and dtype as `current`.
      """
      x_difference = x1 - x2
      y_difference = y1 - y2
      return -y1 * x_difference / y_difference
  
file_path: tf-quant-finance/tf_quant_finance/math/root_search/brent.py
imports: from typing import Callable
  import tensorflow.compat.v2
  from tf_quant_finance import types
  from tf_quant_finance import utils
  from tf_quant_finance.math.root_search import utils
label_desc: Use image node_id 2 for calling a global function with example usage: _secant_step(x1, x2, y1, y2) and returns: unknown