code: def create(
      dataset,
      annotations=None,
      feature=None,
      model="darknet-yolo",
      classes=None,
      batch_size=0,
      max_iterations=0,
      verbose=True,
      grid_shape=[13, 13],
      random_seed=None,
      **kwargs,
  ):
      """
      Create a :class:`ObjectDetector` model.
  
      Parameters
      ----------
      dataset : SFrame
          Input data. The columns named by the ``feature`` and ``annotations``
          parameters will be extracted for training the detector.
  
      annotations : string
          Name of the column containing the object detection annotations.  This
          column should be a list of dictionaries (or a single dictionary), with
          each dictionary representing a bounding box of an object instance. Here
          is an example of the annotations for a single image with two object
          instances::
  
              [{'label': 'dog',
                'type': 'rectangle',
                'coordinates': {'x': 223, 'y': 198,
                                'width': 130, 'height': 230}},
               {'label': 'cat',
                'type': 'rectangle',
                'coordinates': {'x': 40, 'y': 73,
                                'width': 80, 'height': 123}}]
  
          The value for `x` is the horizontal center of the box paired with
          `width` and `y` is the vertical center of the box paired with `height`.
          'None' (the default) indicates the only list column in `dataset` should
          be used for the annotations.
  
      feature : string
          Name of the column containing the input images. 'None' (the default)
          indicates the only image column in `dataset` should be used as the
          feature.
  
      model : string optional
          Object detection model to use:
  
             - "darknet-yolo" : Fast and medium-sized model
  
      grid_shape : array optional
          Shape of the grid used for object detection. Higher values increase precision for small objects, but at a higher computational cost
  
             - [13, 13] : Default grid value for a Fast and medium-sized model
  
      classes : list optional
          List of strings containing the names of the classes of objects.
          Inferred from the data if not provided.
  
      batch_size: int
          The number of images per training iteration. If 0, then it will be
          automatically determined based on resource availability.
  
      max_iterations : int
          The number of training iterations. If 0, then it will be automatically
          be determined based on the amount of data you provide.
  
      random_seed : int, optional
          The results can be reproduced when given the same seed.
  
      verbose : bool, optional
          If True, print progress updates and model details.
  
      Returns
      -------
      out : ObjectDetector
          A trained :class:`ObjectDetector` model.
  
      See Also
      --------
      ObjectDetector
  
      Examples
      --------
      .. sourcecode:: python
  
          # Train an object detector model
          >>> model = turicreate.object_detector.create(data)
  
          # Make predictions on the training set and as column to the SFrame
          >>> data['predictions'] = model.predict(data)
  
          # Visualize predictions by generating a new column of marked up images
          >>> data['image_pred'] = turicreate.object_detector.util.draw_bounding_boxes(data['image'], data['predictions'])
      """
      _raise_error_if_not_sframe(dataset, "dataset")
  
      if len(dataset) == 0:
          raise _ToolkitError("Unable to train on empty dataset")
  
      _numeric_param_check_range(
          "max_iterations", max_iterations, 0, _six.MAXSIZE
      )
      start_time = _time.time()
  
      supported_detectors = ["darknet-yolo"]
  
      if feature is None:
          feature = _tkutl._find_only_image_column(dataset)
          if verbose:
              print("Using '%s' as feature column" % feature)
      if annotations is None:
          annotations = _tkutl._find_only_column_of_type(
              dataset,
              target_type=[list, dict],
              type_name="list",
              col_name="annotations",
          )
          if verbose:
              print("Using '%s' as annotations column" % annotations)
  
      _raise_error_if_not_detection_sframe(
          dataset, feature, annotations, require_annotations=True
      )
      _tkutl._handle_missing_values(dataset, feature, "dataset")
      _tkutl._check_categorical_option_type(
          "model", model, supported_detectors
      )
  
      base_model = model.split("-", 1)[0]
      ref_model = _pre_trained_models.OBJECT_DETECTION_BASE_MODELS[
          base_model
      ]()
  
      pretrained_model = (
          _pre_trained_models.OBJECT_DETECTION_BASE_MODELS[
              "darknet_mlmodel"
          ]()
      )
      pretrained_model_path = pretrained_model.get_model_path()
  
      params = {
          "anchors": [
              (1.0, 2.0),
              (1.0, 1.0),
              (2.0, 1.0),
              (2.0, 4.0),
              (2.0, 2.0),
              (4.0, 2.0),
              (4.0, 8.0),
              (4.0, 4.0),
              (8.0, 4.0),
              (8.0, 16.0),
              (8.0, 8.0),
              (16.0, 8.0),
              (16.0, 32.0),
              (16.0, 16.0),
              (32.0, 16.0),
          ],
          "grid_shape": grid_shape,
          "aug_resize": 0,
          "aug_rand_crop": 0.9,
          "aug_rand_pad": 0.9,
          "aug_rand_gray": 0.0,
          "aug_aspect_ratio": 1.25,
          "aug_hue": 0.05,
          "aug_brightness": 0.05,
          "aug_saturation": 0.05,
          "aug_contrast": 0.05,
          "aug_horizontal_flip": True,
          "aug_min_object_covered": 0,
          "aug_min_eject_coverage": 0.5,
          "aug_area_range": (0.15, 2),
          "aug_pca_noise": 0.0,
          "aug_max_attempts": 20,
          "aug_inter_method": 2,
          "lmb_coord_xy": 10.0,
          "lmb_coord_wh": 10.0,
          "lmb_obj": 100.0,
          "lmb_noobj": 5.0,
          "lmb_class": 2.0,
          "non_maximum_suppression_threshold": 0.45,
          "rescore": True,
          "clip_gradients": 0.025,
          "weight_decay": 0.0005,
          "sgd_momentum": 0.9,
          "learning_rate": 1.0e-3,
          "shuffle": True,
          "mps_loss_mult": 8,
          # This large buffer size (8 batches) is an attempt to mitigate against
          # the SFrame shuffle operation that can occur after each epoch.
          "io_thread_buffer_size": 8,
          "mlmodel_path": pretrained_model_path,
      }
  
      # create tensorflow model here
      _minimal_package_import_check(
          "turicreate.toolkits.libtctensorflow"
      )
  
      if classes == None:
          classes = []
  
      _raise_error_if_not_iterable(classes)
      _raise_error_if_not_iterable(grid_shape)
  
      grid_shape = [int(x) for x in grid_shape]
      assert len(grid_shape) == 2
  
      tf_config = {
          "grid_height": params["grid_shape"][0],
          "grid_width": params["grid_shape"][1],
          "mlmodel_path": params["mlmodel_path"],
          "classes": classes,
          "compute_final_metrics": False,
          "verbose": verbose,
          "model": "darknet-yolo",
          "random_seed": random_seed,
      }
  
      # If batch_size or max_iterations = 0, they will be automatically
      # generated in C++.
      if batch_size > 0:
          tf_config["batch_size"] = batch_size
  
      if max_iterations > 0:
          tf_config["max_iterations"] = max_iterations
  
      model = _tc.extensions.object_detector()
      model.train(
          data=dataset,
          annotations_column_name=annotations,
          image_column_name=feature,
          options=tf_config,
      )
      return ObjectDetector(model_proxy=model, name="object_detector")
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import time
  from datetime import datetime
  import six
  import turicreate
  from turicreate.toolkits._model import Model
  import turicreate.toolkits._internal_utils
  from turicreate.toolkits import _coreml_utils
  from turicreate.toolkits._internal_utils import _raise_error_if_not_sframe, _numeric_param_check_range, _raise_error_if_not_iterable
  from turicreate.toolkits._main import ToolkitError
  from turicreate._deps.minimal_package import _minimal_package_import_check
  from ..None import _pre_trained_models
  from .._mps_utils import MpsGraphAPI, MpsGraphNetworkType
label_desc: Use image node_id 3 for calling a global function with example usage: create(dataset, annotations, feature, model, classes, batch_size, max_iterations, verbose, grid_shape, random_seed) and returns: ObjectDetector