input: Write a function to predict the winning team of football matches using data from the past 5 years of the Premier League. Use a GradientBoostingClassifier model with selected features and evaluate the model's performance. If the model is trained successfully and the score is printed, return True. Otherwise, return False.
  def predict_winning_team():
      try:
          import pandas as pd
          from sklearn.model_selection import train_test_split
          from sklearn.ensemble import GradientBoostingClassifier
  
          # Load data
          data = pd.read_csv('data.csv')
  
          # Select features
          features = data[['home_team_goals', 'away_team_goals', 'home_team_possession', 'away_team_possession',
                           'home_team_shots', 'away_team_shots', 'home_team_yellow_cards', 'away_team_yellow_cards',
                           'home_team_red_cards', 'away_team_red_cards']]
  
          # Select target
          target = data['winner']
  
          # Split data into training and test sets
          X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.2, random_state=42)
  
          # Train the model
          gbm = GradientBoostingClassifier()
          gbm.fit(X_train, y_train)
  
          # Make predictions
          y_pred = gbm.predict(X_test)
  
          # Evaluate the model
          score = gbm.score(X_test, y_test)
          print(f'Model score: {score}')
  
          return True
      except Exception as e:
          print(f'Error: {e}')
          return False
  
  assert predict_winning_team()==True
  assert predict_winning_team()==False # If data.csv is not available
output: def predict_winning_team():
      try:
          import pandas as pd
          from sklearn.model_selection import train_test_split
          from sklearn.ensemble import GradientBoostingClassifier
  
          # Load data
          data = pd.read_csv('data.csv')
  
          # Select features
          features = data[['home_team_goals', 'away_team_goals', 'home_team_possession', 'away_team_possession',
                           'home_team_shots', 'away_team_shots', 'home_team_yellow_cards', 'away_team_yellow_cards',
                           'home_team_red_cards', 'away_team_red_cards']]
  
          # Select target
          target = data['winner']
  
          # Split data into training and test sets
          X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.2, random_state=42)
  
          # Train the model
          gbm = GradientBoostingClassifier()
          gbm.fit(X_train, y_train)
  
          # Make predictions
          y_pred = gbm.predict(X_test)
  
          # Evaluate the model
          score = gbm.score(X_test, y_test)
          print(f'Model score: {score}')
  
          return True
      except Exception as e:
          print(f'Error: {e}')
          return False