code: def prepare_create_statement(self, statement, database_controller):
      # extract data from Create model or Retrain statement and prepare it for using in crate and retrain functions
      project_name = statement.name.parts[0].lower()
      model_name = statement.name.parts[1].lower()
  
      sql_task = None
      if statement.task is not None:
          sql_task = statement.task.to_string()
      problem_definition = {"__mdb_sql_task": sql_task}
      if statement.targets is not None:
          problem_definition["target"] = statement.targets[0].parts[-1]
  
      (
          data_integration_ref,
          fetch_data_query,
      ) = self._get_data_integration_ref(statement, database_controller)
  
      label = None
      if statement.using is not None:
          label = statement.using.pop("tag", None)
  
          problem_definition["using"] = statement.using
  
      if statement.order_by is not None:
          problem_definition["timeseries_settings"] = {
              "is_timeseries": True,
              "order_by": getattr(statement, "order_by")[0].field.parts[
                  -1
              ],
          }
          for attr in ["horizon", "window"]:
              if getattr(statement, attr) is not None:
                  problem_definition["timeseries_settings"][
                      attr
                  ] = getattr(statement, attr)
  
          if statement.group_by is not None:
              problem_definition["timeseries_settings"]["group_by"] = [
                  col.parts[-1] for col in statement.group_by
              ]
  
      join_learn_process = False
      if "join_learn_process" in problem_definition.get("using", {}):
          join_learn_process = problem_definition["using"][
              "join_learn_process"
          ]
          del problem_definition["using"]["join_learn_process"]
  
      return dict(
          model_name=model_name,
          project_name=project_name,
          data_integration_ref=data_integration_ref,
          fetch_data_query=fetch_data_query,
          problem_definition=problem_definition,
          join_learn_process=join_learn_process,
          label=label,
      )
  
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 10 for calling the ModelController obj's underlying member method code with example usage: obj.prepare_create_statement(statement, database_controller) and returns: dict