code: def test_launch_layer_mnist(
      collect_trial_profiles: Callable[[int], None]
  ) -> None:
      config = conf.load_config(
          conf.tutorials_path("mnist_pytorch/const.yaml")
      )
      config = conf.set_max_length(config, {"batches": 200})
      config = conf.set_slots_per_trial(config, 1)
      config = conf.set_profiling_enabled(config)
      config = conf.set_entrypoint(
          config,
          "python3 -m determined.launch.horovod --autohorovod python3 train.py",
      )
  
      experiment_id = exp.run_basic_test_with_temp_config(
          config, conf.tutorials_path("mnist_pytorch"), 1
      )
      trials = exp.experiment_trials(experiment_id)
      collect_trial_profiles(trials[0].trial.id)
  
      assert exp.check_if_string_present_in_trial_logs(
          trials[0].trial.id,
          "resources exited successfully with a zero exit code",
      )
  
imports: from typing import Callable
  import pytest
  from determined.experimental import Determined
  from tests import config
  from tests import experiment
label_desc: Use image node_id 1 for calling a global function with example usage: test_launch_layer_mnist(collect_trial_profiles) without return types