code: def project_to_bounds(x, bounds):
      """Projects to bounds."""
      bounds = np.array(bounds)
      ret = np.clip(x, bounds[:, 0], bounds[:, 1])
      return ret
  
imports: from __future__ import print_function
  from __future__ import division
  import numpy
  from scipy.sparse import dok_matrix
  from scipy.linalg import solve_triangular
label_desc: Use image node_id 4 for calling a global function with example usage: project_to_bounds(x, bounds) and returns: ret