class_docstr: Test end-to-end from task generation to publication of results to MLMD.
class_docstr_tok: ["Test","end-to-end","from","task","generation","to","publication","of","results","to","MLMD","."]
code: def _register_task_scheduler(self, return_result, exception=None):
      ts.TaskSchedulerRegistry.register(
          self._type_url,
          functools.partial(
              _FakeComponentScheduler,
              return_result=return_result,
              exception=exception,
          ),
      )
  
imports: import contextlib
  import functools
  import os
  import threading
  import time
  from absl import logging
  from absl.testing.absltest import mock
  import tensorflow
  from tfx.orchestration import data_types_utils
  from tfx.orchestration import metadata
  from tfx.orchestration.experimental.core import async_pipeline_task_gen
  from tfx.orchestration.experimental.core import constants
  from tfx.orchestration.experimental.core import pipeline_state
  from tfx.orchestration.experimental.core import post_execution_utils
  from tfx.orchestration.experimental.core import service_jobs
  from tfx.orchestration.experimental.core import task
  from tfx.orchestration.experimental.core import task_manager
  from tfx.orchestration.experimental.core import task_queue
  from tfx.orchestration.experimental.core import task_scheduler
  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.proto.orchestration import execution_result_pb2
  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 2 for calling the TaskManagerE2ETest obj's underlying member method code with example usage: obj._register_task_scheduler(return_result, exception) without return types