input: Write a function to create a machine learning model in Python using Keras that distinguishes between cats and dogs given a dataset of 800 images of cats and dogs. The function should return the compiled model.
  model = create_cat_dog_model("/path/to/dataset")
  assert type(model) == keras.models.Sequential
  assert model.layers[0].input_shape == (None, 64, 64, 3)
  assert model.layers[-1].output_shape == (None, 1)
  assert model.loss == 'binary_crossentropy'
output: def create_cat_dog_model(dataset_path):
      from tensorflow.keras.models import Sequential
      from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
      from tensorflow.keras.preprocessing.image import ImageDataGenerator
  
      datagen = ImageDataGenerator(rescale=1./255)
      train_generator = datagen.flow_from_directory(
          dataset_path,
          target_size=(64, 64),
          batch_size=32,
          class_mode='binary'
      )
  
      model = Sequential()
      model.add(Conv2D(32, (3, 3), activation='relu', input_shape=(64, 64, 3)))
      model.add(MaxPooling2D(pool_size=(2, 2)))
      model.add(Conv2D(64, (3, 3), activation='relu'))
      model.add(MaxPooling2D(pool_size=(2, 2)))
      model.add(Flatten())
      model.add(Dense(128, activation='relu'))
      model.add(Dense(1, activation='sigmoid'))
  
      model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
      return model