input: from typing import List, Dict
  
  def categorize_dataset(records: List[Dict[str, any]]) -> str:
      """ Create a machine learning algorithm in Python to categorize a dataset of records.
      >>> categorize_dataset([
      ...     {"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]}, 
      ... ])
      'banana'
      """
output:     from sklearn.neighbors import KNeighborsClassifier
      from sklearn.preprocessing import StandardScaler
      import numpy as np
  
      # Extract features and labels
      X = np.array([record['features'] for record in records])
      y = np.array([record['label'] for record in records])
  
      # Standardize the features
      scaler = StandardScaler()
      X_scaled = scaler.fit_transform(X)
  
      # Train a KNN classifier
      knn = KNeighborsClassifier(n_neighbors=1)
      knn.fit(X_scaled, y)
  
      # Predict the category for the first record
      return knn.predict(X_scaled[0].reshape(1, -1))[0]