code: def exec_train_and_detect(
      self, mock_handler, model_name, using_model
  ):
      # create predictor
      create_sql = f"""
                      CREATE PREDICTOR mindsdb.{model_name}_detector
                      FROM pg
                      (select t, val from nba where train = 1) 
                      PREDICT val
                      USING engine='merlion', task='detector'{using_model}
                  """
      ret = self.run_mindsdb_sql(sql=create_sql)
      assert ret.error_code is None, "train failed: " + model_name
  
      self.wait_training(model_name=f"{model_name}_detector")
  
      predict_sql = f"""
                      select p.t, p.val real, d.val__anomaly_score
                      from mindsdb.{model_name}_detector d
                      inner join pg.nba p on d.t = p.t and d.val = p.val
                      where p.train = 0
                      """
      ret = self.run_mindsdb_sql(sql=predict_sql)
      assert ret.error_code is None, "detect failed: " + model_name
  
imports: import os
  import time
  from unittest.mock import patch
  import pandas
  from mindsdb_sql import parse_sql
  from mindsdb.integrations.handlers.merlion_handler.adapters import DefaultForecasterAdapter, SarimaForecasterAdapter, ProphetForecasterAdapter, MSESForecasterAdapter, IsolationForestDetectorAdapter, WindStatsDetectorAdapter, ProphetDetectorAdapter
  from .executor_test_base import BaseExecutorTest
  import pandas
label_desc: Use image node_id 10 for calling the TestMerlion obj's underlying member method code with example usage: obj.exec_train_and_detect(mock_handler, model_name, using_model) without return types