docstr: Test single worker programmatic mode.
docstr_tok: ["Test","single","worker","programmatic","mode","."]
code: def test_single_worker_programmatic_mode(self):
      """Test single worker programmatic mode."""
      logdir = self.get_temp_dir()
  
      options = profiler.ProfilerOptions(
          host_tracer_level=2,
          python_tracer_level=0,
          device_tracer_level=1,
      )
      profiler.start(logdir, options)
      _, steps, train_ds, model = _model_setup()
      model.fit(x=train_ds, epochs=2, steps_per_epoch=steps)
      profiler.stop()
      self._check_xspace_pb_exist(logdir)
  
imports: import glob
  import os
  import threading
  import portpicker
  from tensorflow.python.distribute import collective_all_reduce_strategy
  from tensorflow.python.distribute import multi_process_runner
  from tensorflow.python.eager import context
  from tensorflow.python.framework import test_util
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.profiler import profiler_client
  from tensorflow.python.profiler import profiler_v2
  from tensorflow.python.profiler.integration_test import mnist_testing_utils
label_desc: Use image node_id 7 for calling the ProfilerApiTest obj's underlying member method code with example usage: obj.test_single_worker_programmatic_mode() without return types