input: from typing import List, Tuple
  
  def calculate_thermal_impedance(temperatures: List[float], wavelengths: List[float], slopes: List[float]) -> Tuple[float, float]:
      """ Calculate the thermal impedance using the provided temperatures, wavelengths, and slopes.
      The function returns two values: the thermal resistance (R_th) and the thermal impedance (dldD / dldT).
      >>> calculate_thermal_impedance([20.0, 25.0], [500.0, 500.5], [0.01, 0.012])
      (2.0, 0.005)
      >>> calculate_thermal_impedance([15.0, 30.0], [499.8, 501.0], [0.008, 0.015])
      (2.5, 0.009)
      """
      pass
output:     n = len(temperatures)
      R_th = 0.0
      dldD_dldT = 0.0
      
      for i in range(n):
          R_th += (temperatures[i] - temperatures[0]) / slopes[i]
          dldD_dldT += (wavelengths[i] - wavelengths[0]) / (temperatures[i] - temperatures[0])
      
      R_th /= n
      dldD_dldT /= n
      
      return R_th, dldD_dldT