input: Write a function to digitize state values based on state bounds in a CartPole environment.
  assert digitize_state([0.1, 0.2, 0.3, 0.4], [(-2.4, 2.4), (-0.5, 0.5), (-0.42, 0.42), (-0.87, 0.87)]) == [2, 2, 6, 3]
  assert digitize_state([-0.5, 0, 0.1, -0.2], [(-2.4, 2.4), (-0.5, 0.5), (-0.42, 0.42), (-0.87, 0.87)]) == [1, 1, 4, 2]
  assert digitize_state([0, 0, 0, 0], [(-2.4, 2.4), (-0.5, 0.5), (-0.42, 0.42), (-0.87, 0.87)]) == [1, 1, 3, 2]
output: def digitize_state(state_values, state_bounds):
      digitized = []
      for value, (low, high) in zip(state_values, state_bounds):
          segments = 10  # Number of segments to divide the range into
          interval = (high - low) / segments
          digitized_value = min(segments, max(0, int((value - low) / interval)))
          digitized.append(digitized_value)
      return digitized