input: Write a function to implement a basic machine learning model in Python that performs binary classification on the given data. The function should use the `LogisticRegression` model from `sklearn.linear_model`, fit the model to the input data, and then compute and return the accuracy of the model on the same data. If the input data is empty, the function should return `None`.
  
  def binary_classification_accuracy(X, y):
      if not X:
          return None
      
      from sklearn import linear_model
      from sklearn.metrics import accuracy_score
      
      model = linear_model.LogisticRegression()
      model.fit(X, y)
      
      y_pred = model.predict(X)
      accuracy = accuracy_score(y, y_pred)
      
      return accuracy
  
  assert binary_classification_accuracy([[0.3, 0.2, 0.6], [0.3, 0.1, 0.4], [0.2, 0.3, 0.4], [0.7, 0.4, 0.2], [0.5, 0.2, 0.1]], [1, 0, 0, 1, 0]) is not None
  assert binary_classification_accuracy([], []) is None
output: def binary_classification_accuracy(X, y):
      if not X:
          return None
      
      from sklearn import linear_model
      from sklearn.metrics import accuracy_score
      
      model = linear_model.LogisticRegression()
      model.fit(X, y)
      
      y_pred = model.predict(X)
      accuracy = accuracy_score(y, y_pred)
      
      return accuracy