docstr: Tests task generation when example-gen service job is still running.
docstr_tok: ["Tests","task","generation","when","example-gen","service","job","is","still","running","."]
code: def test_service_job_running(self):
      """Tests task generation when example-gen service job is still running."""
  
      def _ensure_node_services(unused_pipeline_state, node_id):
          self.assertEqual("my_example_gen", node_id)
          return service_jobs.ServiceStatus(
              code=service_jobs.ServiceStatusCode.RUNNING
          )
  
      self._mock_service_job_manager.ensure_node_services.side_effect = (
          _ensure_node_services
      )
      [task] = self._generate_and_test(
          True,
          num_initial_executions=0,
          num_tasks_generated=1,
          num_new_executions=0,
          num_active_executions=0,
      )
      self.assertIsInstance(task, task_lib.UpdateNodeStateTask)
      self.assertEqual("my_example_gen", task.node_uid.node_id)
      self.assertEqual(pstate.NodeState.RUNNING, task.state)
  
imports: import itertools
  import os
  from typing import Literal
  import uuid
  from absl.testing import parameterized
  from absl.testing.absltest import mock
  import tensorflow
  from tfx.dsl.compiler import constants
  from tfx.orchestration import data_types_utils
  from tfx.orchestration.experimental.core import constants
  from tfx.orchestration.experimental.core import mlmd_state
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import service_jobs
  from tfx.orchestration.experimental.core import sync_pipeline_task_gen
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_gen_utils
  from tfx.orchestration.experimental.core import task_queue
  from tfx.orchestration.experimental.core import test_utils
  from tfx.orchestration.experimental.core.testing import test_sync_pipeline
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable import runtime_parameter_utils
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import status
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 13 for calling the SyncPipelineTaskGeneratorTest obj's underlying member method code with example usage: obj.test_service_job_running() and returns: service_jobs