code: def test_pytorch_mnist_example(tmp_path: pathlib.Path) -> None:
      checkpoint_dir = str(tmp_path.joinpath("checkpoint"))
  
      config = utils.load_config(
          utils.tutorials_path("mnist_pytorch/const.yaml")
      )
      hparams = config["hyperparameters"]
  
      exp_config = utils.make_default_exp_config(
          hparams,
          scheduling_unit=1,
          searcher_metric="validation_loss",
          checkpoint_dir=checkpoint_dir,
      )
      exp_config.update(config)
  
      example_path = utils.tutorials_path("mnist_pytorch/train.py")
      trial_class = utils.import_class_from_module(
          "MNistTrial", example_path
      )
      trial_class._searcher_metric = "validation_loss"
  
      pytorch_utils.train_and_checkpoint(
          trial_class=trial_class,
          hparams=hparams,
          tmp_path=tmp_path,
          exp_config=exp_config,
          steps=(1, 1),
          trial_args={"hparams": hparams},
      )
  
file_path: determined/harness/tests/experiment/pytorch/test_examples.py
imports: import logging
  import os
  import pathlib
  import typing
  import unittest.mock
  import pytest
  import torch
  from torch.distributed import launcher
  from determined import core
  from tests.experiment import pytorch_utils, utils
  from tests.launch import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: test_pytorch_mnist_example(tmp_path) without return types