input: Write a python function to create, compile, and train a convolutional neural network using Keras for binary image classification.
  assert isinstance(model, keras.models.Sequential)
  assert 'Conv2D' in str(model.layers[0])
  assert model.optimizer.__class__.__name__ == 'RMSprop'
output: def create_compile_train_cnn(input_shape, train_data, train_labels, epochs=10):
      from keras.models import Sequential
      from keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
      from keras.optimizers import RMSprop
      
      model = Sequential()
      model.add(Conv2D(32, (3, 3), activation='relu', input_shape=input_shape))
      model.add(MaxPooling2D((2, 2)))
      model.add(Conv2D(64, (3, 3), activation='relu'))
      model.add(MaxPooling2D((2, 2)))
      model.add(Conv2D(128, (3, 3), activation='relu'))
      model.add(Flatten())
      model.add(Dense(512, activation='relu'))
      model.add(Dense(1, activation='sigmoid'))
      
      model.compile(optimizer=RMSprop(),
                    loss='binary_crossentropy',
                    metrics=['accuracy'])
      
      model.fit(train_data, train_labels, epochs=epochs)
      
      return model