input: Write a python function to define and optimize a model using Bayesian Optimization from scikit-optimize.
  assert isinstance(optimize_model(search_space), list)
  assert len(optimize_model(search_space)) == 5
  assert isinstance(optimize_model(search_space)[0], int)
  assert isinstance(optimize_model(search_space)[1], int)
output: def optimize_model(search_space):
      from skopt import gp_minimize
      from skopt.space import Integer
  
      def model_to_optimize(params):
          # Example simple model: sum of squares
          return sum(x**2 for x in params)
  
      # Define the search space using Integer for each dimension
      dimensions = [Integer(low, high) for low, high in search_space]
  
      # Perform Bayesian Optimization
      res = gp_minimize(model_to_optimize, dimensions, n_calls=50, random_state=0)
  
      # Return the best found parameters
      return res.x