code: def wait_predictor(self, project, name):
      # wait
      done = False
      for attempt in range(200):
          ret = self.run_sql(
              f"select * from {project}.models where name='{name}'"
          )
          if not ret.empty:
              if ret["STATUS"][0] == "complete":
                  done = True
                  break
              elif ret["STATUS"][0] == "error":
                  break
          time.sleep(0.5)
      if not done:
          raise RuntimeError("predictor wasn't created")
  
file_path: mindsdb/tests/unit/ml_handlers/test_anomaly_detection.py
imports: import time
  import pandas
  from unittest.mock import patch
  from mindsdb_sql import parse_sql
  from tests.unit.executor_test_base import BaseExecutorTest
  from mindsdb.integrations.handlers.anomaly_detection_handler.anomaly_detection_handler import choose_model, preprocess_data
label_desc: Use image node_id 1 for calling the TestAnomalyDetectionHandler obj's underlying member method code with example usage: obj.wait_predictor(project, name) without return types