class_docstr: Strategy that handles communication on a single device.
docstr: Perform a all_gather on all processes.
docstr_tok: ["Perform","a","all_gather","on","all","processes","."]
code: def all_gather(
      self,
      tensor: Tensor,
      group: Any | None = None,
      sync_grads: bool = False,
  ) -> Tensor:
      """Perform a all_gather on all processes."""
      return tensor
  
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 3 for calling the SingleDeviceStrategy obj's underlying member method code with example usage: obj.all_gather(tensor, group, sync_grads) and returns: tensor