code: def wait_for_service_endpoint(service_name, timeout_sec=120):
      
  
      master_count = len(get_all_masters())
      return time_wait(lambda: service_available_predicate(service_name),
                       timeout_seconds=timeout_sec,
                       required_consecutive_success_count=master_count)
docs: Checks the service url if available it returns true, on expiration
      it returns false