input: 
  def predict_customer_ltv(past_transactions: pd.DataFrame) -> float:
      """ Predicts the customer lifetime value given a DataFrame of past transactions.
      >>> predict_customer_ltv(pd.DataFrame({
      ...     'purchase_amount': [10, 20, 30],
      ...     'items_purchased': [2, 3, 4],
      ...     'customer_id': [1, 1, 1],
      ...     'ltv': [50, 100, 150]
      ... }))
      100.0
      """
      X = past_transactions.iloc[:,:-1].values
      y = past_transactions.iloc[:,-1].values
      scaler = StandardScaler()
      X = scaler.fit_transform(X)
      model = RandomForestRegressor()
      model.fit(X, y)
      customer_input = X[-1].reshape(1, -1)
      trans_scaled = scaler.transform(customer_input)
      predicted_LTV = model.predict(trans_scaled)[0]
      return predicted_LTV
  
output:     from sklearn.preprocessing import StandardScaler
      from sklearn.ensemble import RandomForestRegressor