code: def sakoe_chiba_band(
      n_timestamps_1, n_timestamps_2=None, window_size=0.1
  ):
      """Compute the Sakoe-Chiba band.
  
      Parameters
      ----------
      n_timestamps_1 : int
          The size of the first time series.
  
      n_timestamps_2 : int (optional, default None)
          The size of the second time series. If None, set to `n_timestamps_1`.
  
      window_size : float or int (default = 0.1)
          The window size above and below the diagonale.
          If float, `window_size must be between 0 and
          1, and the actual window size will be computed as:
          ``ceil(window_size * max((n_timestamps_1, n_timestamps_2) - 1))``.
          If int, `window_size` must be the largest temporal shift allowed.
          Each cell whose distance with the diagonale is lower than or equal to
          'window_size' becomes a valid cell for the path.
  
      Returns
      -------
      region : array, shape = (2, n_timestamps_1)
          Constraint region. The first row consists of the starting indices
          (included) and the second row consists of the ending indices (excluded)
          of the valid rows for each column.
  
      References
      ----------
      .. [1] H. Sakoe and S. Chiba, “Dynamic programming algorithm optimization
             for spoken word recognition”. IEEE Transactions on Acoustics,
             Speech, and Signal Processing, 26(1), 43-49 (1978).
  
      Examples
      --------
      >>> from pyts.metrics import sakoe_chiba_band
      >>> print(sakoe_chiba_band(5, window_size=0.5))
      [[0 0 0 1 2]
       [3 4 5 5 5]]
  
      """
      if n_timestamps_2 is None:
          n_timestamps_2 = n_timestamps_1
      (
          scale,
          horizontal_shift,
          vertical_shift,
      ) = _check_sakoe_chiba_params(
          n_timestamps_1, n_timestamps_2, window_size
      )
  
      lower_bound = (
          scale * (np.arange(n_timestamps_1) - horizontal_shift)
          - vertical_shift
      )
      lower_bound = np.round(lower_bound, 2)
      lower_bound = np.ceil(lower_bound)
      upper_bound = (
          scale * (np.arange(n_timestamps_1) + horizontal_shift)
          + vertical_shift
      )
      upper_bound = np.round(upper_bound, 2)
      upper_bound = np.floor(upper_bound) + 1
      region = np.asarray([lower_bound, upper_bound]).astype("int64")
      region = _check_region(region, n_timestamps_1, n_timestamps_2)
      return region
  
imports: import numpy
  from math import ceil, log2, sqrt
  from numba import njit, prange
  from sklearn.utils import check_array
label_desc: Use image node_id 18 for calling a global function with example usage: sakoe_chiba_band(n_timestamps_1, n_timestamps_2, window_size) and returns: region