input: Write a function to train a logistic regression model on sentiment data and make a prediction on a new sentence.
  assert sentiment_prediction("This movie was terrible") == 0
  assert sentiment_prediction("I love this film!") == 1
  assert sentiment_prediction("What a waste of time.") == 0
output: def sentiment_prediction(sentence):
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.model_selection import train_test_split
      from sklearn.linear_model import LogisticRegression
      import numpy as np
      
      # Dummy data for training
      texts = ["I love this movie!", "This film is great!", "What a wonderful experience!", 
               "I hated this movie.", "This film was terrible.", "What a waste of time."]
      labels = [1, 1, 1, 0, 0, 0]
      
      # Create the CountVectorizer
      vectorizer = CountVectorizer()
      X = vectorizer.fit_transform(texts)
      
      # Split data (although here we're using all for training since it's a simple example)
      X_train, X_test, y_train, y_test = train_test_split(X, labels, test_size=0.33, random_state=42)
      
      # Train the logistic regression model
      model = LogisticRegression()
      model.fit(X_train, y_train)
      
      # Transform the input sentence using the same vectorizer
      X_new = vectorizer.transform([sentence])
      
      # Make a prediction
      prediction = model.predict(X_new)
      
      return prediction[0]