input: Write a function to create a machine learning algorithm in Python that categorizes a dataset of records. The function should take a dataset as input, train an SVM classifier, and return the predicted label for a given sample.
  
  def categorize_records(dataset, predict_data):
      X = []
      y = []
      for data in dataset:
          X.append(data['features'])
          y.append(data['label'])
  
      clf = SVC()
      clf.fit(X, y)
  
      predicted_label = clf.predict([predict_data])
      return predicted_label[0]
  
  assert categorize_records([
      {"label": "apple", "features": [1, 1, 0]}, 
      {"label": "banana", "features": [0, 1, 1]}, 
      {"label": "lemon", "features": [0, 0, 1]}, 
      {"label": "orange", "features": [1, 0, 0]}, 
      {"label": "pear", "features": [0, 1, 0]}, 
  ], [1, 0, 1]) == "banana"
  
  assert categorize_records([
      {"label": "apple", "features": [1, 1, 0]}, 
      {"label": "banana", "features": [0, 1, 1]}, 
      {"label": "lemon", "features": [0, 0, 1]}, 
      {"label": "orange", "features": [1, 0, 0]}, 
      {"label": "pear", "features": [0, 1, 0]}, 
  ], [0, 1, 0]) == "pear"
  
  assert categorize_records([
      {"label": "apple", "features": [1, 1, 0]}, 
      {"label": "banana", "features": [0, 1, 1]}, 
      {"label": "lemon", "features": [0, 0, 1]}, 
      {"label": "orange", "features": [1, 0, 0]}, 
      {"label": "pear", "features": [0, 1, 0]}, 
  ], [1, 0, 0]) == "orange"
output: 
  def categorize_records(dataset, predict_data):
      X = []
      y = []
      for data in dataset:
          X.append(data['features'])
          y.append(data['label'])
  
      clf = SVC()
      clf.fit(X, y)
  
      predicted_label = clf.predict([predict_data])
      return predicted_label[0]
  