input: Write a function to create a new task in the database.
  assert create_task({'title': 'Test Task'})['title'] == 'Test Task'
  assert create_task({'title': ''})['error'] == 'Title must be provided.'
  assert create_task({'title': 'Another Task'})['title'] == 'Another Task'
output: def create_task(data):
      if 'title' not in data or not data['title']:
          return {'error': 'Title must be provided.'}
      return {'title': data['title']}