input: Write a python function to detect and mark anomalies in a dataset using IsolationForest.
  assert len(detect_anomalies("data.csv")) > 0
  assert isinstance(detect_anomalies("data.csv"), np.ndarray)
output: def detect_anomalies(file_path):
      import pandas as pd
      from sklearn.ensemble import IsolationForest
      import numpy as np
  
      # Load the dataset
      data = pd.read_csv(file_path)
  
      # Fit the IsolationForest model
      clf = IsolationForest(contamination=0.1, random_state=42)
      clf.fit(data)
  
      # Predict anomalies
      data['anomaly'] = clf.predict(data)
      data['anomaly'] = data['anomaly'].apply(lambda x: 1 if x == -1 else 0)
  
      return data['anomaly'].values