code: def prepare_finetune_statement(self, statement, database_controller):
      (
          project_name,
          model_name,
          model_version,
      ) = resolve_model_identifier(statement.name)
      if project_name is None:
          project_name = "mindsdb"
      (
          data_integration_ref,
          fetch_data_query,
      ) = self._get_data_integration_ref(statement, database_controller)
  
      set_active = True
      if statement.using is not None:
          set_active = statement.using.pop("active", True)
          if set_active in ("0", 0, None):
              set_active = False
  
      label = None
      args = {}
      if statement.using is not None:
          label = statement.using.pop("tag", None)
          args = statement.using
  
      join_learn_process = args.pop("join_learn_process", False)
  
      base_predictor_record = get_model_record(
          name=model_name,
          project_name=project_name,
          version=model_version,
          active=True if model_version is None else None,
      )
  
      if data_integration_ref is None:
          data_integration_ref = (
              base_predictor_record.data_integration_ref
          )
      if fetch_data_query is None:
          fetch_data_query = base_predictor_record.fetch_data_query
  
      return dict(
          model_name=model_name,
          project_name=project_name,
          data_integration_ref=data_integration_ref,
          fetch_data_query=fetch_data_query,
          base_model_version=model_version,
          args=args,
          join_learn_process=join_learn_process,
          label=label,
          set_active=set_active,
      )
  
imports: import sys
  import copy
  import datetime
  from copy import deepcopy
  from multiprocessing.pool import ThreadPool
  import pandas
  from dateutil.parser import parse
  from sqlalchemy import func, null
  import numpy
  import mindsdb.interfaces.storage.db
  from mindsdb.utilities.config import Config
  from mindsdb.interfaces.model.functions import get_model_record, get_model_records
  from mindsdb.interfaces.storage.json import get_json_storage
  from mindsdb.interfaces.storage.model_fs import ModelStorage
  from mindsdb.utilities.context import context
  from mindsdb.utilities.functions import resolve_model_identifier
  import mindsdb.utilities.profiler
  from mindsdb.utilities.exception import EntityExistsError, EntityNotExistsError
  from mindsdb.utilities import log
label_desc: Use image node_id 13 for calling the ModelController obj's underlying member method code with example usage: obj.prepare_finetune_statement(statement, database_controller) and returns: dict