code: def loop_until_timeout_or_not_none(timeout_s, function, sleep_s=1):  # pylint: disable=invalid-name
    
    return loop_until_timeout_or_valid(
        timeout_s, function, lambda x: x is not None, sleep_s)
docs: Loops until the specified function returns non-None or until a timeout.
  
    Args:
      timeout_s: The number of seconds to wait until a timeout condition is
          reached. As a convenience, this accepts None to mean never timeout.  Can
          also be passed a PolledTimeout object instead of an integer.
      function: The function to call each iteration.
      sleep_s: The number of seconds to wait after calling the function.
  
    Returns:
      Whatever the function returned last.