code: def backward(ctx, output_grad: Tensor) -> Tuple[Tensor, ...]:
      mu, sigma, weight = ctx.saved_tensors
  
      bias_grad, weight_grad = output_grad, output_grad * mu / sigma
      bias_grad = torch.sum(
          bias_grad, dim=tuple(range(len(bias_grad.shape))[:-1])
      )
      bias_grad, op = all_reduce(
          bias_grad, ctx.input_x_weight_parallel_mode, async_op=True
      )
      bias_grad = push_async_grad(op, bias_grad, ctx.bias_id)
      weight_grad = torch.sum(
          weight_grad, dim=tuple(range(len(weight_grad.shape))[:-1])
      )
      weight_grad, op = all_reduce(
          weight_grad, ctx.input_x_weight_parallel_mode, async_op=True
      )
      weight_grad = push_async_grad(op, weight_grad, ctx.weight_id)
  
      dmu, dmean, dvar = norm_backward(output_grad, mu, sigma, weight)
      dvar, dmean = all_reduce(
          torch.stack((dvar, dmean)), ctx.output_parallel_mode
      )
      input_grad = dmu + (dmean + 2 * dvar * mu) / ctx.normalized_shape
  
      return (
          input_grad,
          weight_grad,
          bias_grad,
          None,
          None,
          None,
          None,
          None,
          None,
          None,
          None,
      )
  
imports: from typing import Optional, Tuple
  import torch
  from torch import Tensor
  from torch.cuda.amp import custom_bwd, custom_fwd
  from colossalai.legacy.communication import all_gather, all_reduce, broadcast, reduce, reduce_scatter
  from colossalai.legacy.constants import INPUT_GROUP_3D, WEIGHT_GROUP_3D
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from ._utils import get_parallel_mode_from_env, push_async_grad
label_desc: Use image node_id 2 for calling the _Layernorm3D obj's underlying member method code with example usage: obj.backward(ctx, output_grad) and returns: input_grad,  weight_grad,  bias_grad,  None,  None,  None,  None,  None,  None,  None,  None