code: def _get_step(x, d_x, z, d_z, tau, d_tau, kappa, d_kappa, alpha0):
      """
      An implementation of [4] equation 8.21
  
      References
      ----------
      .. [4] Andersen, Erling D., and Knud D. Andersen. "The MOSEK interior point
             optimizer for linear programming: an implementation of the
             homogeneous algorithm." High performance optimization. Springer US,
             2000. 197-232.
  
      """
      # [4] 4.3 Equation 8.21, ignoring 8.20 requirement
      # same step is taken in primal and dual spaces
      # alpha0 is basically beta3 from [4] Table 8.1, but instead of beta3
      # the value 1 is used in Mehrota corrector and initial point correction
      i_x = d_x < 0
      i_z = d_z < 0
      alpha_x = (
          alpha0 * np.min(x[i_x] / -d_x[i_x]) if np.any(i_x) else 1
      )
      alpha_tau = alpha0 * tau / -d_tau if d_tau < 0 else 1
      alpha_z = (
          alpha0 * np.min(z[i_z] / -d_z[i_z]) if np.any(i_z) else 1
      )
      alpha_kappa = alpha0 * kappa / -d_kappa if d_kappa < 0 else 1
      alpha = np.min([1, alpha_x, alpha_tau, alpha_z, alpha_kappa])
      return alpha
  
file_path: catboost/contrib/python/scipy/py2/scipy/optimize/_linprog_ip.py
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import scipy
  import scipy.sparse
  from warnings import warn
  from scipy.linalg import LinAlgError
  from .optimize import OptimizeWarning, _check_unknown_options
label_desc: Use image node_id 4 for calling a global function with example usage: _get_step(x, d_x, z, d_z, tau, d_tau, kappa, d_kappa, alpha0) and returns: alpha