docstr: Generates tasks and tests the effects.
docstr_tok: ["Generates","tasks","and","tests","the","effects","."]
code: def _generate_and_test(
      self,
      use_task_queue,
      num_initial_executions,
      num_tasks_generated,
      num_new_executions,
      num_active_executions,
      expected_exec_nodes=None,
      ignore_update_node_state_tasks=False,
  ):
      """Generates tasks and tests the effects."""
      return test_utils.run_generator_and_test(
          self,
          self._mlmd_cm,
          asptg.AsyncPipelineTaskGenerator,
          self._pipeline,
          self._task_queue,
          use_task_queue,
          self._mock_service_job_manager,
          num_initial_executions=num_initial_executions,
          num_tasks_generated=num_tasks_generated,
          num_new_executions=num_new_executions,
          num_active_executions=num_active_executions,
          expected_exec_nodes=expected_exec_nodes,
          ignore_update_node_state_tasks=ignore_update_node_state_tasks,
      )
  
imports: import os
  from absl.testing import parameterized
  from absl.testing.absltest import mock
  import tensorflow
  from tfx.orchestration import node_proto_view
  from tfx.orchestration.experimental.core import async_pipeline_task_gen
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import service_jobs
  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_async_pipeline
  from tfx.orchestration import mlmd_connection_manager
  from tfx.orchestration.portable.input_resolution import exceptions
  from tfx.utils import status
label_desc: Use image node_id 3 for calling the AsyncPipelineTaskGeneratorTest obj's underlying member method code with example usage: obj._generate_and_test(use_task_queue, num_initial_executions, num_tasks_generated, num_new_executions, num_active_executions, expected_exec_nodes, ignore_update_node_state_tasks) and returns: test_utils