input: Write a function to create and train a logistic regression model for text classification.
  assert train_logistic_regression_model("emails.csv") > 0.8
  assert train_logistic_regression_model("spam.csv") > 0.75
output: def train_logistic_regression_model(csv_file):
      import pandas as pd
      from sklearn.model_selection import train_test_split
      from sklearn.feature_extraction.text import TfidfVectorizer
      from sklearn.linear_model import LogisticRegression
      from sklearn.metrics import accuracy_score
      
      # Load data
      df = pd.read_csv(csv_file)
      
      # Assuming the CSV has two columns: 'text' and 'label'
      X = df['text']
      y = df['label']
      
      # Split 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)
      
      # Convert text data to TF-IDF features
      vectorizer = TfidfVectorizer()
      X_train_tfidf = vectorizer.fit_transform(X_train)
      X_test_tfidf = vectorizer.transform(X_test)
      
      # Train logistic regression model
      model = LogisticRegression()
      model.fit(X_train_tfidf, y_train)
      
      # Predict and calculate accuracy
      y_pred = model.predict(X_test_tfidf)
      accuracy = accuracy_score(y_test, y_pred)
      
      return accuracy