code: def wait_for_bump(self, buttons, timeout_ms=None):
          
          start_time = time.time()
  
          if self.wait_for_pressed(buttons, timeout_ms):
              if timeout_ms is not None:
                  timeout_ms -= int((time.time() - start_time) * 1000)
              return self.wait_for_released(buttons, timeout_ms)
  
          return False
docs: Wait for the button to be pressed down and then released.
          Both actions must happen within timeout_ms.