input: Write a python function to generate a predictive model to predict the number of employees who will leave in a given year based on the age, job position, and current salary.
  assert isinstance(generate_predictive_model(), LinearRegression)
  assert generate_predictive_model().score(x, y) > 0.7
output: def generate_predictive_model():
      from sklearn.linear_model import LinearRegression
      from sklearn.model_selection import train_test_split
      from sklearn.preprocessing import StandardScaler, OneHotEncoder
      from sklearn.compose import ColumnTransformer
      from sklearn.pipeline import Pipeline
      import pandas as pd
      import numpy as np
  
      # Sample data for the purpose of this function
      data = {
          'age': np.random.randint(20, 60, size=100),
          'job_position': np.random.choice(['Manager', 'Developer', 'Analyst'], size=100),
          'current_salary': np.random.randint(30000, 120000, size=100),
          'num_employees_left': np.random.randint(0, 50, size=100)
      }
  
      df = pd.DataFrame(data)
  
      X = df[['age', 'job_position', 'current_salary']]
      y = df['num_employees_left']
  
      # Define preprocessing for numerical columns (scale them)
      numerical_features = ['age', 'current_salary']
      numerical_transformer = StandardScaler()
  
      # Define preprocessing for categorical features (one-hot encode them)
      categorical_features = ['job_position']
      categorical_transformer = OneHotEncoder(drop='first')
  
      # Create a preprocessor with the column transformer
      preprocessor = ColumnTransformer(
          transformers=[
              ('num', numerical_transformer, numerical_features),
              ('cat', categorical_transformer, categorical_features)
          ]
      )
  
      # Create a pipeline that combines the preprocessor with a linear regression model
      model = Pipeline(steps=[
          ('preprocessor', preprocessor),
          ('regressor', LinearRegression())
      ])
  
      # Split the data into training and testing sets
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
  
      # Fit the model
      model.fit(X_train, y_train)
  
      # Check the model score
      score = model.score(X_test, y_test)
      print(f"Model R^2 Score: {score}")
  
      # Ensure the model's score is above 0.7
      assert score > 0.7
  
      return model