code: def _make_test_workloads(
      config: det.ExperimentConfig,
  ) -> workload.Stream:
      interceptor = workload.WorkloadResponseInterceptor()
  
      logger.info("Training one batch")
      yield from interceptor.send(workload.train_workload(1))
      metrics = interceptor.metrics_result()
      batch_metrics = metrics["metrics"]["batch_metrics"]
      check.eq(len(batch_metrics), config.scheduling_unit())
      logger.info(f"Finished training, metrics: {batch_metrics}")
  
      logger.info("Validating one batch")
      yield from interceptor.send(workload.validation_workload(1))
      validation = interceptor.metrics_result()
      v_metrics = validation["metrics"]["validation_metrics"]
      logger.info(
          f"Finished validating, validation metrics: {v_metrics}"
      )
  
      logger.info("Saving a checkpoint.")
      yield workload.checkpoint_workload(), workload.ignore_workload_response
      logger.info("Finished saving a checkpoint.")
  
file_path: determined/harness/determined/experimental/_native.py
imports: import logging
  import tempfile
  from typing import Any, Dict, Optional, Type
  import determined
  from determined import workload
  from determined.common import check
label_desc: Use image node_id 1 for calling a global function with example usage: _make_test_workloads(config) without return types