class_docstr: Strategy that handles communication on a single device.
code: def __init__(
      self,
      device: _DEVICE = "cpu",
      accelerator: pl.accelerators.accelerator.Accelerator
      | None = None,
      checkpoint_io: CheckpointIO | None = None,
      precision_plugin: Precision | None = None,
  ):
      super().__init__(
          accelerator=accelerator,
          checkpoint_io=checkpoint_io,
          precision_plugin=precision_plugin,
      )
      if not isinstance(device, torch.device):
          device = torch.device(device)
      self._root_device = device
      self.global_rank = 0
      self.local_rank = 0
      self.world_size = 1
  
imports: from __future__ import annotations
  from typing import Any
  import torch
  from torch import Tensor
  from typing_extensions import override
  import lightning.pytorch
  from lightning.fabric.plugins import CheckpointIO
  from lightning.fabric.strategies import _StrategyRegistry
  from lightning.fabric.utilities.types import _DEVICE
  from lightning.pytorch.plugins.precision import Precision
  from lightning.pytorch.strategies.strategy import Strategy, TBroadcast
label_desc: Use image node_id 1 to create a new SingleDeviceStrategy object from inherited base classes: Strategy with example: obj = SingleDeviceStrategy(device, accelerator, checkpoint_io, precision_plugin)