input: Write a function to implement a binary classification model using a basic machine learning algorithm such as Logistic Regression from the sklearn library. The function should take in a dataset and its corresponding labels, train the model on this data, predict the labels, and finally return the accuracy of the model.
  assert perform_binary_classification([[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 perform_binary_classification([[0.1, 0.1, 0.9], [0.8, 0.3, 0.2], [0.2, 0.7, 0.5], [0.6, 0.2, 0.8], [0.9, 0.1, 0.6]], [0, 1, 1, 0, 1])==1.0
  assert perform_binary_classification([], [])==0.0
  assert perform_binary_classification([[0.4, 0.5, 0.7]], [1])==1.0
  assert perform_binary_classification([[0.5, 0.5, 0.5], [0.4, 0.6, 0.4]], [0, 1])==0.5
output: 
  from sklearn.linear_model import LogisticRegression
  from sklearn.metrics import accuracy_score
  
  def perform_binary_classification(data, labels):
      if not data or not labels:
          return 0.0
      model = LogisticRegression()
      model.fit(data, labels)
      predictions = model.predict(data)
      return accuracy_score(labels, predictions)
  