input: Write a python function to split a dataframe into train and test sets, scale the features, train a K-Nearest Neighbors classifier, and return the model accuracy.
  assert round(train_knn_model(df, 'direction', test_size=0.2, n_neighbors=3)*100, 2) == expected_accuracy
  assert round(train_knn_model(df, 'direction', test_size=0.3, n_neighbors=5)*100, 2) == expected_accuracy
output: def train_knn_model(df, target_column, test_size=0.2, n_neighbors=3):
      from sklearn.model_selection import train_test_split
      from sklearn.preprocessing import StandardScaler
      from sklearn.neighbors import KNeighborsClassifier
      from sklearn.metrics import accuracy_score
  
      X = df.drop(columns=[target_column])
      y = df[target_column]
  
      X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=test_size, random_state=42)
  
      scaler = StandardScaler()
      X_train_scaled = scaler.fit_transform(X_train)
      X_test_scaled = scaler.transform(X_test)
  
      knn = KNeighborsClassifier(n_neighbors=n_neighbors)
      knn.fit(X_train_scaled, y_train)
  
      y_pred = knn.predict(X_test_scaled)
      accuracy = accuracy_score(y_test, y_pred)
  
      return accuracy