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
Compute the region of feasible alignment paths.
pyts/metrics/dtw.py