input: Write a function to create a machine learning program in Python that will classify text data into 3 different categories. The function should load data from a CSV file, vectorize the text using CountVectorizer, convert target labels to numerical values, split the data into training and testing sets, train a Multinomial Naive Bayes model, test the model, and print out the classification report. If the input data does not have the required columns, the function should raise a ValueError. The function should be named `classify_text` and take one argument: the path to the CSV file.
  assert classify_text("data.csv") != ValueError
  assert classify_text("invalid_path.csv") == ValueError
output: def classify_text(csv_path):
      import pandas as pd
      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 sklearn.preprocessing import LabelEncoder
  
      try:
          data = pd.read_csv(csv_path)
          if 'text' not in data.columns or 'category' not in data.columns:
              raise ValueError("Input data does not have the required columns.")
          
          X = data['text']
          y = data['category']
          
          vectorizer = CountVectorizer()
          X = vectorizer.fit_transform(X)
          
          label_encoder = LabelEncoder()
          y = label_encoder.fit_transform(y)
          
          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)
          
          print(classification_report(y_test, y_pred, target_names=label_encoder.classes_))
      
      except FileNotFoundError:
          raise ValueError("File not found.")