code: def create(
      dataset,
      session_id,
      target,
      features=None,
      prediction_window=100,
      validation_set="auto",
      max_iterations=10,
      batch_size=32,
      verbose=True,
      random_seed=None,
  ):
      """
      Create an :class:`ActivityClassifier` model.
  
      Parameters
      ----------
      dataset : SFrame
          Input data which consists of `sessions` of data where each session is
          a sequence of data. The data must be in `stacked` format, grouped by
          session. Within each session, the data is assumed to be sorted
          temporally. Columns in `features` will be used to train a model that
          will make a prediction using labels in the `target` column.
  
      session_id : string
          Name of the column that contains a unique ID for each session.
  
      target : string
          Name of the column containing the target variable. The values in this
          column must be of string or integer type. Use `model.classes` to
          retrieve the order in which the classes are mapped.
  
      features : list[string], optional
          Name of the columns containing the input features that will be used
          for classification. If set to `None`, all columns except `session_id`
          and `target` will be used.
  
      prediction_window : int, optional
          Number of time units between predictions. For example, if your input
          data is sampled at 100Hz, and the `prediction_window` is set to 100,
          then this model will make a prediction every 1 second.
  
      validation_set : SFrame, optional
          A dataset for monitoring the model's generalization performance to
          prevent the model from overfitting to the training data.
  
          For each row of the progress table, accuracy is measured over the
          provided training dataset and the `validation_set`. The format of this
          SFrame must be the same as the training set.
  
          When set to 'auto', a validation set is automatically sampled from the
          training data (if the training data has > 100 sessions). If
          validation_set is set to None, then all the data will be used for
          training.
  
      max_iterations : int , optional
          Maximum number of iterations/epochs made over the data during the
          training phase.
  
      batch_size : int, optional
          Number of sequence chunks used per training step. Must be greater than
          the number of GPUs in use.
  
      verbose : bool, optional
          If True, print progress updates and model details.
  
      random_seed : int, optional
          The results can be reproduced when given the same seed.
  
      Returns
      -------
      out : ActivityClassifier
          A trained :class:`ActivityClassifier` model.
  
      Examples
      --------
      .. sourcecode:: python
  
          >>> import turicreate as tc
  
          # Training on dummy data
          >>> data = tc.SFrame({
          ...    'accelerometer_x': [0.1, 0.2, 0.3, 0.4, 0.5] * 10,
          ...    'accelerometer_y': [0.5, 0.4, 0.3, 0.2, 0.1] * 10,
          ...    'accelerometer_z': [0.01, 0.01, 0.02, 0.02, 0.01] * 10,
          ...    'session_id': [0, 0, 0] * 10 + [1, 1] * 10,
          ...    'activity': ['walk', 'run', 'run'] * 10 + ['swim', 'swim'] * 10
          ... })
  
          # Create an activity classifier
          >>> model = tc.activity_classifier.create(data,
          ...     session_id='session_id', target='activity',
          ...     features=['accelerometer_x', 'accelerometer_y', 'accelerometer_z'])
  
          # Make predictions (as probability vector, or class)
          >>> predictions = model.predict(data)
          >>> predictions = model.predict(data, output_type='probability_vector')
  
          # Get both predictions and classes together
          >>> predictions = model.classify(data)
  
          # Get topk predictions (instead of only top-1) if your labels have more
          # 2 classes
          >>> predictions = model.predict_topk(data, k = 3)
  
          # Evaluate the model
          >>> results = model.evaluate(data)
  
      See Also
      --------
      ActivityClassifier, util.random_split_by_session
      """
  
      _tkutl._raise_error_if_not_sframe(dataset, "dataset")
      if not isinstance(target, str):
          raise _ToolkitError("target must be of type str")
      if not isinstance(session_id, str):
          raise _ToolkitError("session_id must be of type str")
      if not isinstance(batch_size, int):
          raise _ToolkitError("batch_size must be of type int")
  
      _tkutl._raise_error_if_sframe_empty(dataset, "dataset")
      _tkutl._numeric_param_check_range(
          "prediction_window", prediction_window, 1, 400
      )
      _tkutl._numeric_param_check_range(
          "max_iterations", max_iterations, 0, _six.MAXSIZE
      )
  
      if features is None:
          features = _fe_tkutl.get_column_names(
              dataset,
              interpret_as_excluded=True,
              column_names=[session_id, target],
          )
      if not hasattr(features, "__iter__"):
          raise TypeError("Input 'features' must be a list.")
      if not all([isinstance(x, str) for x in features]):
          raise TypeError(
              'Invalid member of "features": feature names must be of type str.'
          )
      if len(features) == 0:
          raise TypeError(
              "Input 'features' must contain at least one column name."
          )
  
      start_time = _time.time()
      dataset = _tkutl._toolkits_select_columns(
          dataset, features + [session_id, target]
      )
      _tkutl._raise_error_if_sarray_not_expected_dtype(
          dataset[target], target, [str, int]
      )
      _tkutl._raise_error_if_sarray_not_expected_dtype(
          dataset[session_id], session_id, [str, int]
      )
  
      for feature in features:
          _tkutl._handle_missing_values(
              dataset, feature, "training_dataset"
          )
  
      # Check for missing values for sframe validation set
      if isinstance(validation_set, _SFrame):
          _tkutl._raise_error_if_sframe_empty(
              validation_set, "validation_set"
          )
          for feature in features:
              _tkutl._handle_missing_values(
                  validation_set, feature, "validation_set"
              )
  
      # C++ model
      name = "activity_classifier"
  
      import turicreate as _turicreate
  
      # Imports tensorflow
      _minimal_package_import_check(
          "turicreate.toolkits.libtctensorflow"
      )
  
      model = _turicreate.extensions.activity_classifier()
      options = {}
      options["prediction_window"] = prediction_window
      options["batch_size"] = batch_size
      options["max_iterations"] = max_iterations
      options["verbose"] = verbose
      options["_show_loss"] = False
      options["random_seed"] = random_seed
  
      model.train(dataset, target, session_id, validation_set, options)
      return ActivityClassifier(model_proxy=model, name=name)
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import time
  import six
  from turicreate import SFrame
  import turicreate.toolkits._internal_utils
  from turicreate.toolkits import _coreml_utils
  import turicreate.toolkits._feature_engineering._internal_utils
  from turicreate.toolkits._main import ToolkitError
  from turicreate._deps.minimal_package import _minimal_package_import_check
  from turicreate.toolkits._model import Model
label_desc: Use image node_id 1 for calling a global function with example usage: create(dataset, session_id, target, features, prediction_window, validation_set, max_iterations, batch_size, verbose, random_seed) and returns: ActivityClassifier