code: def forward(ctx, xs, input_splits=None, output_splits=None):
      ctx.input_splits = input_splits
      ctx.output_splits = output_splits
  
      ys = (
          torch.empty_like(xs)
          if output_splits is None
          else xs.new_empty(
              size=[sum(output_splits)] + list(xs.size()[1:])
          )
      )
      torch.distributed.all_to_all_single(
          ys,
          xs,
          output_split_sizes=output_splits,
          input_split_sizes=input_splits,
      )
      return ys
  
file_path: thu-pacman-faster-moe/fmoe/gates/base_layer_gate.py
imports: import torch.nn
  import torch
  import fmoe_cuda
  import numpy
label_desc: Use image node_id 1 for calling the All2All obj's underlying member method code with example usage: obj.forward(ctx, xs, input_splits, output_splits) and returns: ys