class_docstr: Set up executor: mock data handler and LW handler
code: def set_predictor(self, predictor):
      # fill model_interface mock with predictor data for test case
  
      # clear calls
      self.mock_model_controller.reset_mock()
      self.mock_predict.reset_mock()
      self.mock_create.reset_mock()
  
      # remove previous predictor record
      r = self.db.Predictor.query.filter_by(
          name=predictor["name"]
      ).first()
      if r is not None:
          self.db.session.delete(r)
  
      if "problem_definition" not in predictor:
          predictor["problem_definition"] = {
              "timeseries_settings": {"is_timeseries": False}
          }
  
      # add predictor to table
      r = self.db.Predictor(
          name=predictor["name"],
          data={"dtypes": predictor["dtypes"]},
          learn_args=predictor["problem_definition"],
          to_predict=predictor["predict"],
          integration_id=self.lw_integration_id,
          project_id=1,
          status="complete",
      )
      self.db.session.add(r)
      self.db.session.commit()
  
      def predict_f(
          _model_name, data, pred_format="dict", *args, **kargs
      ):
          explain_arr = []
          if isinstance(data, dict):
              data = [data]
  
          predicted_value = predictor["predicted_value"]
          target = predictor["predict"]
  
          meta = {
              # 'select_data_query': None, 'when_data': None,
              "original": None,
              "confidence": 0.8,
              "anomaly": None,
          }
  
          data = copy.deepcopy(data)
          for row in data:
              # row = row.copy()
              exp_row = {
                  "predicted_value": predictor["predicted_value"],
                  "confidence": 0.9999,
                  "anomaly": None,
                  "truth": None,
              }
              explain_arr.append({predictor["predict"]: exp_row})
  
              row[target] = predicted_value
              # dict_arr.append({predictor['predict']: row})
  
              for k, v in meta.items():
                  row[f"{target}_{k}"] = v
              row[f"{target}_explain"] = str(exp_row)
  
          if pred_format == "explain":
              return explain_arr
          return pd.DataFrame(data)
  
      predictor_record = {
          "version": None,
          "is_active": None,
          "status": "complete",
          "current_phase": None,
          "accuracy": 0.9992752583404642,
          "data_source": None,
          "update": "available",
          "data_source_name": None,
          "mindsdb_version": "22.3.5.0",
          "error": None,
          "train_end_at": None,
          "updated_at": dt.datetime(2022, 5, 12, 16, 40, 26),
          "created_at": dt.datetime(2022, 4, 4, 14, 48, 39),
      }
      predictor["dtype_dict"] = predictor["dtypes"]
      predictor_record.update(predictor)
  
      def get_model_data_f(name, *args):
          if name != predictor["name"]:
              raise Exception(f"Model does not exists: {name}")
          return predictor_record
  
      # inject predictor info to model interface
      self.mock_predict.side_effect = predict_f
      self.mock_model_controller.get_models.side_effect = lambda: [
          predictor_record
      ]
      self.mock_model_controller.get_model_data.side_effect = (
          get_model_data_f
      )
  
imports: import copy
  import datetime
  import json
  import os
  import sys
  import tempfile
  from unittest import mock
  from pathlib import Path
  import duckdb
  import numpy
  import pandas
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb_sql import parse_sql
label_desc: Use image node_id 2 for calling the BaseExecutorMockPredictor obj's underlying member method code with example usage: obj.set_predictor(predictor) and returns: pd, predictor_record, explain_arr