input: Write a python function to preprocess data from a CSV file for a Naive Bayes classifier using sklearn.
  assert preprocess_data("data.csv").shape == (expected_number_of_rows, expected_number_of_columns)
  assert preprocess_data("data.csv").columns.tolist() == expected_column_names
output: import pandas as pd
  from sklearn.preprocessing import LabelEncoder
  
  def preprocess_data(file_path):
      df = pd.read_csv(file_path)
      
      # Fill missing values
      df.fillna(method='ffill', inplace=True)
      
      # Convert categorical columns to numerical values
      label_encoders = {}
      for column in df.select_dtypes(include=['object']).columns:
          le = LabelEncoder()
          df[column] = le.fit_transform(df[column])
          label_encoders[column] = le
      
      return df