code: def _compute_region(
      n_timestamps_1,
      n_timestamps_2,
      method,
      dist,
      x=None,
      y=None,
      **options,
  ):
      """Compute the region of feasible alignment paths."""
  
      if method == "classic":
          region = None
      elif method == "sakoechiba":
          region = sakoe_chiba_band(
              n_timestamps_1, n_timestamps_2, **options
          )
      elif method == "itakura":
          region = itakura_parallelogram(
              n_timestamps_1, n_timestamps_2, **options
          )
      elif method == "multiscale":
          region = _multiscale_region(x, y, dist, **options)
      elif method == "fast":
          region = _fast_region(x, y, dist, **options)
      else:
          raise ValueError(
              "'method' must be either 'classic', 'sakoechiba', "
              "'itakura', 'multiscale' or 'fast'."
          )
  
      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 26 for calling a global function with example usage: _compute_region(n_timestamps_1, n_timestamps_2, method, dist, x, y) and returns: region