code: def _check_region(region, n_timestamps_1, n_timestamps_2):
      """Project region on the feasible set."""
      region = np.clip(region[:, :n_timestamps_1], 0, 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 8 for calling a global function with example usage: _check_region(region, n_timestamps_1, n_timestamps_2) and returns: region