input: Write a python function to create and train a neural network model using TensorFlow.
  assert create_and_train_model(np.random.rand(1000, 1000), np.random.randint(2, size=1000)).history['accuracy'][-1] > 0.5
  assert create_and_train_model(np.random.rand(500, 1000), np.random.randint(2, size=500)).history['accuracy'][-1] > 0.5
output: import tensorflow as tf
  from tensorflow.keras.models import Sequential
  from tensorflow.keras.layers import Dense
  import numpy as np
  
  def create_and_train_model(X, y):
      model = Sequential()
      model.add(Dense(64, input_dim=X.shape[1], activation='relu'))
      model.add(Dense(32, activation='relu'))
      model.add(Dense(1, activation='sigmoid'))
  
      model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
  
      history = model.fit(X, y, epochs=10, batch_size=32, verbose=0)
      
      return history