input: Write a function to create a recommendation system in Python using Pandas to recommend new products to customers based on past purchases. The function should read data from a CSV file, create an item-based collaborative filter using the NearestNeighbors algorithm, and print recommendations for each item.
  assert create_recommendations("product_data.csv")
  
output: def create_recommendations(csv_file):
      import pandas as pd
      from sklearn.neighbors import NearestNeighbors
  
      # Load the data
      df = pd.read_csv(csv_file)
  
      # Pivot the data to create a user-item matrix
      user_item_matrix = df.pivot_table(index='user_id', columns='product_id', values='rating').fillna(0)
  
      # Fit the NearestNeighbors model
      model_knn = NearestNeighbors(metric='cosine', algorithm='brute')
      model_knn.fit(user_item_matrix.values)
  
      # Get recommendations for each item
      for product_id in user_item_matrix.columns:
          distances, indices = model_knn.kneighbors(user_item_matrix[product_id].values.reshape(1, -1), n_neighbors=6)
          recommendations = []
          for i in range(1, len(distances.flatten())):
              recommendations.append(user_item_matrix.columns[indices.flatten()[i]])
          print(f"Recommendations for product {product_id}: {recommendations}")