docstr: Helper to run a simple training run on the model.
docstr_tok: ["Helper","to","run","a","simple","training","run","on","the","model","."]
code: def _train_model(self, model):
      """Helper to run a simple training run on the model."""
      dataset = self.data.gen_tf_dataset(
          batch_size=2,
          is_training=True,
          shuffle=False,
          preprocess=self.preprocessor,
      )
      optimizer = tf.keras.optimizers.experimental.SGD(
          learning_rate=0.03, momentum=0.9
      )
      model.compile(optimizer=optimizer)
      model.fit(
          x=dataset,
          epochs=2,
          steps_per_epoch=None,
          validation_data=dataset,
      )
  
imports: import os
  import tempfile
  from unittest import mock
  import numpy
  import tensorflow
  from mediapipe.model_maker.python.vision.object_detector import dataset
  from mediapipe.model_maker.python.vision.object_detector import model
  from mediapipe.model_maker.python.vision.object_detector import model_options
  from mediapipe.model_maker.python.vision.object_detector import model_spec
  from mediapipe.model_maker.python.vision.object_detector import preprocessor
  from mediapipe.tasks.python.test import test_utils
label_desc: Use image node_id 3 for calling the ObjectDetectorModelTest obj's underlying member method code with example usage: obj._train_model(model) without return types