input: Write a function to create a machine learning model in Python that predicts customer lifetime value given a customer's past transactions. The function should preprocess the data, train a RandomForestRegressor model, and then make predictions.
  
  
  import pandas as pd
  import numpy as np
  
  from sklearn.preprocessing import StandardScaler
  from sklearn.ensemble import RandomForestRegressor
  
  def predict_ltv(transactions_csv_path, customer_input):
      # Preprocessing
      df = pd.read_csv(transactions_csv_path)
      X = df.iloc[:,:-1].values
      y = df.iloc[:,-1].values
      scaler = StandardScaler()
      X = scaler.fit_transform(X)
  
      # Model Training
      model = RandomForestRegressor()
      model.fit(X, y)
  
      # Prediction
      trans_scaled = scaler.transform(customer_input)
      predicted_LTV = model.predict(trans_scaled)[0]
      return predicted_LTV
  
  assert predict_ltv('transactions.csv', np.array([[10,100,5]])) > 0
  assert predict_ltv('transactions.csv', np.array([[5,50,2]])) > 0
  assert predict_ltv('transactions.csv', np.array([[20,200,10]])) > 0
  
output: 
  def predict_ltv(transactions_csv_path, customer_input):
      # Preprocessing
      df = pd.read_csv(transactions_csv_path)
      X = df.iloc[:,:-1].values
      y = df.iloc[:,-1].values
      scaler = StandardScaler()
      X = scaler.fit_transform(X)
  
      # Model Training
      model = RandomForestRegressor()
      model.fit(X, y)
  
      # Prediction
      trans_scaled = scaler.transform(customer_input)
      predicted_LTV = model.predict(trans_scaled)[0]
      return predicted_LTV
  