input: def model_compilation(model: Sequential, train_generator: ImageDataGenerator) -> Sequential:
      """Compile and fit a machine learning model using Keras to distinguish between cats and dogs.
      The function takes a preconfigured Keras model and a data generator, compiles the model,
      and fits it to the training data.
      >>> from keras.models import Sequential
      >>> from keras.preprocessing.image import ImageDataGenerator
      >>> model = Sequential()
      >>> datagen = ImageDataGenerator(rescale=1./255)
      >>> train_generator = datagen.flow_from_directory(directory='/path/to/dataset', target_size=(64, 64), color_mode='rgb', class_mode='binary', batch_size=32)
      >>> model_compilation(model, train_generator)  # returns a compiled and trained model
      """
output:     model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
      model.fit(train_generator, epochs=10, steps_per_epoch=train_generator.samples // train_generator.batch_size)
      return model