docs: def find_good(control_board, actuation_steps, resistor_index, start_index,
                end_index):
      '''
      Use a binary search over the range of provided actuation_steps to find the
      maximum actuation voltage that is measured by the board feedback circuit
      using the specified feedback resistor.
      '''
      lower = start_index
      upper = end_index
      while lower < upper - 1:
          index = lower + (upper - lower) / 2
          v = actuation_steps[index]
          control_board.set_waveform_voltage(v)
          data = measure_board_rms(control_board)
          valid_data = data[data['divider resistor index'] >= 0]
  
          if (valid_data['divider resistor index'] < resistor_index).sum():
              # We have some measurements from another resistor.
              upper = index
          else:
              lower = index
      control_board.set_waveform_voltage(actuation_steps[lower])
      data = measure_board_rms(control_board)
      return lower, data