input: def calculate_gini_coefficient(dataset: List[float]) -> float:
      """Calculate the Gini coefficient of a given dataset.
      >>> calculate_gini_coefficient([2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 21])
      0.605
      """
output:     if not dataset:
          return 0.0
      
      dataset.sort()
      n = len(dataset)
      total_sum = sum(dataset)
      
      lorenz_curve_area = 0.0
      cumulative_sum = 0.0
      
      for value in dataset:
          cumulative_sum += value
          lorenz_curve_area += cumulative_sum - value / 2
      
      gini_coefficient = (total_sum * n / 2 - lorenz_curve_area) / (total_sum * n / 2)
      
      return round(gini_coefficient, 3)