def METHOD_NAME(**kwargs):
  """Runs the worker function in a thread."""
  with test.mock.patch.object(dc, '_run_std_server',
                              self._make_mock_run_std_server()):
    strategy = get_strategy_object(strategy_cls)
    with strategy.scope():
      return worker_fn(**kwargs)