code: def _max_steps(i, j, max_length, length_1, length_2):
      """Maximum number of steps required in a L-DTW process to reach a given
      cell.
  
      Parameters
      ----------
      i : int
          Cell row index
  
      j : int
          Cell column index
  
      max_length : int
          Maximum allowed length
  
      length_1 : int
          Length of the first time series
  
      length_2 : int
          Length of the second time series
  
      Returns
      -------
      int
          Number of steps
      """
      candidate_1 = i + j
      candidate_2 = max_length - max(length_1 - i - 1, length_2 - j - 1)
      return min(candidate_1, candidate_2)
  
imports: import warnings
  import numpy
  from numba import njit, prange
  from tslearn.backend import instantiate_backend
  from tslearn.utils import to_time_series
  from .utils import _cdist_generic
label_desc: Use image node_id 14 for calling a global function with example usage: _max_steps(i, j, max_length, length_1, length_2) and returns: min