code: def create(self, target, args=None, **kwargs):
      df: pd.DataFrame = kwargs.get(self.KWARGS_DF, None)
      # prepare arguments
      using_args = args.get("using", dict())
      task = using_args.get(self.ARG_USING_TASK, TaskType.forecast.name)
      model_type = using_args.get(
          self.ARG_USING_MODEL_TYPE, self.DEFAULT_MODEL_TYPE
      )
      timeseries_settings = args.get("timeseries_settings", dict())
      time_column = timeseries_settings.get("order_by", None)
      horizon = timeseries_settings.get(
          "horizon", self.DEFAULT_MAX_PREDICT_STEP
      )
      window = timeseries_settings.get(
          "window", self.DEFAULT_PREDICT_BASE_WINDOW
      )
      # update args for default value maybe has been used, only time column will be set afterwards
      serialize_args = dict()
      serialize_args[self.ARG_TARGET] = target
      serialize_args[self.ARG_USING_TASK] = task
      serialize_args[self.ARG_USING_MODEL_TYPE] = model_type
      serialize_args[self.ARG_PREDICT_HORIZON] = horizon
      serialize_args[self.ARG_BASE_WINDOW] = window
  
      # check df
      if df is None:
          raise Exception(
              "missing required key in args: " + self.KWARGS_DF
          )
      else:
          column_sequence = sorted(list(df.columns.values))
          df = df[column_sequence]
          serialize_args[self.ARG_COLUMN_SEQUENCE] = column_sequence
  
      # check task, model_type and get the adapter_class
      adapter_class = self.__args_to_adapter_class(
          task=task, model_type=model_type
      )
      task_enum = TaskType[task]
  
      # check and cast to ts dataframe
      ts_df, time_column = to_ts_dataframe(df=df, time_col=time_column)
      serialize_args[self.ARG_TIME_COLUMN] = time_column
  
      # train model
      model_args = {}
      if task_enum == TaskType.forecast:
          model_args[
              MerlionArguments.max_forecast_steps.value
          ] = horizon
      adapter: BaseMerlionForecastAdapter = adapter_class(**model_args)
      logger.info("Training model, args: " + json.dumps(serialize_args))
      adapter.train(df=ts_df, target=target)
      logger.info("Training model completed.")
  
      # persist save model
      model_bytes = adapter.to_bytes()
      self.model_storage.file_set(
          self.PERSIST_MODEL_FILE_NAME, model_bytes
      )
      self.model_storage.json_set(
          self.PERSIST_ARGS_KEY_IN_JSON_STORAGE, serialize_args
      )
      logger.info("Model and args saved.")
  
imports: from enum import Enum
  import json
  from typing import Optional, Dict
  import numpy
  import pandas
  import copy
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.utilities import log
  from .adapters import BaseMerlionForecastAdapter, DefaultForecasterAdapter, MerlionArguments, DefaultDetectorAdapter, SarimaForecasterAdapter, ProphetForecasterAdapter, MSESForecasterAdapter, IsolationForestDetectorAdapter, WindStatsDetectorAdapter, ProphetDetectorAdapter
label_desc: Use image node_id 1 for calling the MerlionHandler obj's underlying member method code with example usage: obj.create(target, args) without return types