code: def test_amp_cpus(tmpdir, strategy, precision, devices):
      """Make sure combinations of AMP and strategies work if supported."""
      trainer = Trainer(
          default_root_dir=tmpdir,
          accelerator="cpu",
          devices=devices,
          strategy=strategy,
          precision=precision,
          max_epochs=1,
          limit_train_batches=1,
          limit_val_batches=1,
          limit_test_batches=1,
          limit_predict_batches=1,
          logger=False,
          enable_checkpointing=False,
          enable_model_summary=False,
          enable_progress_bar=False,
      )
      model = AMPTestModel()
      trainer.fit(model)
      trainer.test(model)
      trainer.predict(model)
  
file_path: pytorch-lightning/tests/tests_pytorch/models/test_amp.py
imports: import os
  from unittest import mock
  import pytest
  import torch
  from lightning.fabric.plugins.environments import SLURMEnvironment
  from lightning.pytorch import Trainer
  from lightning.pytorch.demos.boring_classes import BoringModel, RandomDataset
  from torch.utils.data import DataLoader
  import tests_pytorch.helpers.utils
  from tests_pytorch.helpers.runif import RunIf
label_desc: Use image node_id 1 for calling a global function with example usage: test_amp_cpus(tmpdir, strategy, precision, devices) without return types