input: Write a function to perform sentiment analysis on product reviews using natural language processing techniques and machine learning. The function should tokenize the reviews, remove stopwords, lemmatize the words, generate features using CountVectorizer, split the data into training and test sets, train a Multinomial Naive Bayes model, and generate a classification report. If the input data is empty, return a message indicating that there are no reviews to analyze.
  assert sentiment_analysis_on_reviews(pd.DataFrame({'review': ["This product is great!", "I hate this product."], 'sentiment': ['positive', 'negative']}))
  assert sentiment_analysis_on_reviews(pd.DataFrame({'review': [], 'sentiment': []})) == "No reviews to analyze."
output: def sentiment_analysis_on_reviews(data):
      if data.empty:
          return "No reviews to analyze."
      
      from sklearn.feature_extraction.text import CountVectorizer
      from sklearn.model_selection import train_test_split
      from sklearn.naive_bayes import MultinomialNB
      from sklearn.metrics import classification_report
      from nltk.corpus import stopwords
      from nltk.stem import WordNetLemmatizer
      import nltk
      nltk.download('stopwords')
      nltk.download('wordnet')
      
      stop_words = set(stopwords.words('english'))
      lemmatizer = WordNetLemmatizer()
      
      def preprocess(text):
          tokens = text.split()
          tokens = [lemmatizer.lemmatize(word) for word in tokens if word.lower() not in stop_words]
          return ' '.join(tokens)
      
      data['review'] = data['review'].apply(preprocess)
      
      X = data['review']
      y = data['sentiment']
      
      vectorizer = CountVectorizer()
      X = vectorizer.fit_transform(X)
      
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      model = MultinomialNB()
      model.fit(X_train, y_train)
      
      y_pred = model.predict(X_test)
      
      return classification_report(y_test, y_pred)