input: Write a python function to train an XGBoost classifier on a given dataset and return its accuracy. 
  assert train_xgboost_classifier('email.csv') > 0.8  # Assuming the accuracy is greater than 0.8
  assert isinstance(train_xgboost_classifier('email.csv'), float)
output: def train_xgboost_classifier(file_path):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.metrics import accuracy_score
      import xgboost as xgb
  
      # Load dataset
      data = pd.read_csv(file_path)
      
      # Split dataset into features and target variable
      X = data.drop('target', axis=1)
      y = data['target']
      
      # Split dataset into training and test sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
      
      # Initialize XGBoost classifier
      model = xgb.XGBClassifier(use_label_encoder=False, eval_metric='logloss')
      
      # Train the model
      model.fit(X_train, y_train)
      
      # Make predictions
      y_pred = model.predict(X_test)
      
      # Calculate accuracy
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy