input: Write a python function to create and train a simple neural network model using PyTorch.
  assert isinstance(create_and_train_model(torch.tensor([[0.5, 0.4], [0.7, 0.2], [0.3, 0.1], [0.6, 0.9]]), torch.tensor([0, 1, 0, 1])), torch.Tensor)
  assert create_and_train_model(torch.tensor([[0.5, 0.4], [0.7, 0.2], [0.3, 0.1], [0.6, 0.9]]), torch.tensor([0, 1, 0, 1])).shape == torch.Size([4, 1])
  assert create_and_train_model(torch.tensor([[0.5, 0.4], [0.7, 0.2], [0.3, 0.1], [0.6, 0.9]]), torch.tensor([0, 1, 0, 1])).dtype == torch.float32
output: import torch
  import torch.nn as nn
  import torch.optim as optim
  
  def create_and_train_model(X, y):
      # Define a simple neural network model
      class SimpleNN(nn.Module):
          def __init__(self):
              super(SimpleNN, self).__init__()
              self.fc1 = nn.Linear(2, 10)
              self.fc2 = nn.Linear(10, 1)
          
          def forward(self, x):
              x = torch.relu(self.fc1(x))
              x = torch.sigmoid(self.fc2(x))
              return x
  
      # Instantiate the model, loss function, and optimizer
      model = SimpleNN()
      criterion = nn.BCELoss()
      optimizer = optim.SGD(model.parameters(), lr=0.01)
      
      # Train the model
      X = X.float()
      y = y.float().unsqueeze(1)
      for epoch in range(1000):  # number of epochs
          optimizer.zero_grad()
          outputs = model(X)
          loss = criterion(outputs, y)
          loss.backward()
          optimizer.step()
      
      # Return the output of the trained model
      return model(X)