code: def itakura_parallelogram(
      x: np.ndarray, y: np.ndarray, itakura_max_slope: float
  ) -> np.ndarray:
      """Create a itakura parallelogram bounding matrix.
  
      Parameters
      ----------
      x: np.ndarray (2d array)
          First time series.
      y: np.ndarray (2d array)
          Second time series.
      itakura_max_slope: float or int
          Gradient of the slope must be between 0 and 1.
  
      Returns
      -------
      np.ndarray (2d of size mxn where m is len(x) and n is len(y)).
          Sakoe Chiba bounding matrix where the values inside the bound are finite
          values (0s) and outside the bounds are infinity (non finite).
  
      Raises
      ------
      ValueError
          If the itakura_max_slope is not a float or int.
      """
      if itakura_max_slope < 0 or itakura_max_slope > 1:
          raise ValueError("Window must between 0 and 1")
      x_size = x.shape[1]
      y_size = y.shape[1]
      bounding_matrix = np.full((y_size, x_size), np.inf)
      itakura_max_slope = (
          math.floor(((x_size / 100) * itakura_max_slope) * 100) / 2
      )
  
      middle_x_upper = math.ceil(x_size / 2)
      middle_x_lower = math.floor(x_size / 2)
      if middle_x_lower == middle_x_upper:
          middle_x_lower = middle_x_lower - 1
      middle_y = math.floor(y_size / 2)
  
      difference_from_middle_y = abs(
          (middle_x_lower * itakura_max_slope) - middle_y
      )
      middle_y_lower = middle_y + difference_from_middle_y
      middle_y_upper = middle_y - difference_from_middle_y
  
      x_upper_line_values = np.interp(
          list(range(x_size)),
          [0, middle_x_lower, middle_x_upper, x_size - 1],
          [0, middle_y_upper, middle_y_upper, y_size - 1],
      )
      x_lower_line_values = np.interp(
          list(range(x_size)),
          [0, middle_x_lower, middle_x_upper, x_size - 1],
          [0, middle_y_lower, middle_y_lower, y_size - 1],
      )
  
      if np.array_equal(x_upper_line_values, x_lower_line_values):
          x_upper_line_values = _check_line_steps(x_upper_line_values)
  
      bounding_matrix = create_shape_on_matrix(
          bounding_matrix, x_upper_line_values, x_lower_line_values
      )
  
      return bounding_matrix
  
file_path: sktime/sktime/distances/_lower_bounding_numba.py
imports: import math
  from typing import Union
  import numpy
  from sktime.utils.numba.njit import njit
label_desc: Use image node_id 5 for calling a global function with example usage: itakura_parallelogram(x, y, itakura_max_slope) and returns: bounding_matrix