code: def wait_predictor_learn(predictor_name):
      start_time = time.time()
      learn_done = False
      while learn_done is False and (time.time() - start_time) < 180:
          learn_done = (
              get_predictor_data(predictor_name)["status"] == "complete"
          )
          time.sleep(1)
      assert learn_done
  
file_path: mindsdb/tests/integration_tests/flows/http_test_helpers.py
imports: import requests
  import time
  from mindsdb.api.executor.data_types.response_type import RESPONSE_TYPE
  from .conftest import HTTP_API_ROOT
label_desc: Use image node_id 6 for calling a global function with example usage: wait_predictor_learn(predictor_name) without return types