code: def resolve_bounding_matrix(
      x: np.ndarray,
      y: np.ndarray,
      window: Union[float, None] = None,
      itakura_max_slope: Union[float, None] = None,
      bounding_matrix: np.ndarray = None,
  ) -> np.ndarray:
      """Resolve the bounding matrix parameters.
  
      Parameters
      ----------
      x: np.ndarray (2d array)
          First time series.
      y: np.ndarray (2d array)
          Second time series.
      window: float, defaults = None
          Float that is the % radius of the sakoe chiba window (if using Sakoe-Chiba
          lower bounding). Must be between 0 and 1.
      itakura_max_slope: float, defaults = None
          Gradient of the slope for itakura parallelogram (if using Itakura
          Parallelogram lower bounding). Must be between 0 and 1.
      bounding_matrix: np.ndarray (2d array)
          Custom bounding matrix to use. If defined then this matrix will be returned.
          Other lower_bounding params and creation will be ignored. The matrix should be
          structure so that indexes considered in bound should be the value 0. and indexes
          outside the bounding matrix should be infinity.
  
      Returns
      -------
      np.ndarray (2d array)
          Bounding matrix to use. The matrix is structured so that indexes
          considered in bound are of the value 0. and indexes outside the bounding
          matrix of the value infinity.
  
      Raises
      ------
      ValueError
          If the input time series is not a numpy array.
          If the input time series doesn't have exactly 2 dimensions.
          If the sakoe_chiba_window_radius is not an float.
          If the itakura_max_slope is not a float or int.
          If both window and itakura_max_slope are set
      """
      if bounding_matrix is None:
          if itakura_max_slope is not None and window is not None:
              raise ValueError(
                  "You can only use one bounding matrix at once. You"
                  "have set both window and itakura_max_slope parameter."
              )
          if window is not None:
              # Sakoe-chiba
              lower_bounding = LowerBounding(2)
          elif itakura_max_slope is not None:
              # Itakura parallelogram
              lower_bounding = LowerBounding(3)
          else:
              # No bounding
              lower_bounding = LowerBounding(1)
  
          return lower_bounding.create_bounding_matrix(
              x,
              y,
              sakoe_chiba_window_radius=window,
              itakura_max_slope=itakura_max_slope,
          )
      else:
          return bounding_matrix
  
file_path: sktime/sktime/distances/lower_bounding.py
imports: from enum import Enum
  from typing import Union
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: resolve_bounding_matrix(x, y, window, itakura_max_slope, bounding_matrix) and returns: lower_bounding, bounding_matrix