input: Write a python function to define, compile, train, and evaluate a Keras model with specified parameters.
  assert isinstance(create_and_train_model(x_train, y_train, x_test, y_test), dict)
  assert 'loss' in create_and_train_model(x_train, y_train, x_test, y_test)
  assert 'accuracy' in create_and_train_model(x_train, y_train, x_test, y_test)
output: def create_and_train_model(x_train, y_train, x_test, y_test):
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Dense
      from tensorflow.keras.optimizers import Adam
      
      # Define the model
      model = Sequential()
      model.add(Dense(128, input_dim=x_train.shape[1], activation='relu'))
      model.add(Dense(64, activation='relu'))
      model.add(Dense(1, activation='sigmoid'))
      
      # Compile the model
      model.compile(optimizer=Adam(), loss='binary_crossentropy', metrics=['accuracy'])
      
      # Train the model
      model.fit(x_train, y_train, epochs=10, batch_size=32, validation_split=0.2, verbose=0)
      
      # Evaluate the model
      results = model.evaluate(x_test, y_test, verbose=0)
      
      return {'loss': results[0], 'accuracy': results[1]}