code: def forward(ctx: Any, group: dist.ProcessGroup, input: Tensor) -> Tensor:  # type: ignore
      ctx.group = group
      input = input.contiguous()
      output = torch.empty_like(input)
      dist.all_to_all_single(output, input, group=group)
      return output
  
file_path: fairscale/fairscale/nn/moe/moe_layer.py
imports: from typing import TYPE_CHECKING, Any, Optional, Tuple, Union, cast
  import torch
  from torch import Tensor
  import torch.distributed
  from torch.nn import Module, ModuleList
label_desc: Use image node_id 1 for calling the _AllToAll obj's underlying member method code with example usage: obj.forward(ctx, group, input) and returns: output