input: Write a python function to calculate the distance traveled by a differential drive robot using encoder values and the robot's geometry.
  assert calculate_distance(1000, 2000, 500, 0.5) == 1.5
  assert calculate_distance(1500, 2500, 600, 0.6) == 1.6666666666666665
  assert calculate_distance(2000, 3000, 700, 0.7) == 1.7142857142857142
output: def calculate_distance(encoder_left, encoder_right, ticks_per_revolution, wheel_diameter):
      # Calculate the circumference of the wheel
      wheel_circumference = 3.141592653589793 * wheel_diameter
      
      # Calculate the distance traveled by each wheel
      distance_left = (encoder_left / ticks_per_revolution) * wheel_circumference
      distance_right = (encoder_right / ticks_per_revolution) * wheel_circumference
      
      # Calculate the average distance traveled
      distance_traveled = (distance_left + distance_right) / 2
      
      return distance_traveled