code: def _get_mps_od_net(
      input_image_shape,
      batch_size,
      output_size,
      anchors,
      config,
      weights={},
  ):
      """
      Initializes an MpsGraphAPI for object detection.
      """
      network = _MpsGraphAPI(
          network_id=_MpsGraphNetworkType.kODGraphNet
      )
  
      c_in, h_in, w_in = input_image_shape
      c_out = output_size
      h_out = h_in // 32
      w_out = w_in // 32
  
      network.init(
          batch_size,
          c_in,
          h_in,
          w_in,
          c_out,
          h_out,
          w_out,
          weights=weights,
          config=config,
      )
      return network
  
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 1 for calling a global function with example usage: _get_mps_od_net(input_image_shape, batch_size, output_size, anchors, config, weights) and returns: network