code: def test_torch_amp(ray_start_4_cpus):
      def train_fn():
          train.torch.accelerate(amp=True)
          model = torch.nn.Linear(1, 1)
          model = train.torch.prepare_model(model)
  
          train.report({}, checkpoint=TorchCheckpoint.from_model(model))
  
      trainer = TorchTrainer(
          train_fn,
          scaling_config=ScalingConfig(num_workers=2),
      )
      results = trainer.fit()
      assert results.checkpoint
  
imports: import contextlib
  import os
  import tempfile
  import time
  import uuid
  from unittest.mock import patch
  import pytest
  import torch
  import ray
  import ray.train
  from ray.cluster_utils import Cluster
  from ray.train import Checkpoint, RunConfig, ScalingConfig
  from ray.train.examples.pytorch.torch_linear_example import train_func
  from ray.train.torch import TorchCheckpoint, TorchConfig, TorchPredictor, TorchTrainer
  from ray.train.trainer import TrainingFailedError
label_desc: Use image node_id 11 for calling a global function with example usage: test_torch_amp(ray_start_4_cpus) without return types