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 and should return the accuracy of the model on the training data.
  assert implementation([[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]) == 1.0
  assert implementation([[0.4, 0.3, 0.5], [0.2, 0.1, 0.3], [0.1, 0.2, 0.6], [0.8, 0.5, 0.1], [0.6, 0.3, 0.2]], [0, 1, 1, 0, 1]) == 0.6
  assert implementation([], []) == 0.0
  assert implementation([[0.4, 0.3, 0.5]], [1]) == 1.0
  assert implementation([[0.4, 0.3, 0.5]], [0]) == 0.0
output: 
  from sklearn.linear_model import LogisticRegression
  
  def implementation(X, y):
      if not X or not y:
          return 0.0
      model = LogisticRegression()
      model.fit(X, y)
      return model.score(X, y)
  