code: def when_matches(self, path, good_value, bad_values=None, timeout=None,
                       event_timeout=None):
          
          future = self.when_matches_async(path, good_value, bad_values)
          self.wait_all_futures(
              future, timeout=timeout, event_timeout=event_timeout)
docs: Resolve when an path value equals value
  
          Args:
              path (list): The path to wait to
              good_value (object): the value to wait for
              bad_values (list): values to raise an error on
              timeout (float): time in seconds to wait for responses, wait
                  forever if None
              event_timeout: maximum time in seconds to wait between each response
                  event, wait forever if None