input: Write a python function to paginate a list of dictionaries based on page number and page size.
  assert paginate([{'id': 1}, {'id': 2}, {'id': 3}, {'id': 4}], 1, 2) == [{'id': 1}, {'id': 2}]
  assert paginate([{'id': 1}, {'id': 2}, {'id': 3}, {'id': 4}], 2, 2) == [{'id': 3}, {'id': 4}]
  assert paginate([{'id': 1}, {'id': 2}, {'id': 3}, {'id': 4}], 1, 3) == [{'id': 1}, {'id': 2}, {'id': 3}]
output: def paginate(data, page_number, page_size):
      start_index = (page_number - 1) * page_size
      end_index = start_index + page_size
      return data[start_index:end_index]