code: def send_backward(
      input_tensor_grads: Union[
          torch.Tensor, List[Union[None, torch.Tensor]]
      ],
      tensor_shapes: List[Union[None, List[int]]],
      *,
      dtype: Optional[torch.dtype] = None,
      async_comm: bool = False,
      sequence_parallel_enabled: bool = False,
      sync_batch_comm: bool = True,
  ) -> None:
      if not isinstance(input_tensor_grads, list):
          input_tensor_grads = [input_tensor_grads]
      for input_tensor_grad, tensor_shape in zip(
          input_tensor_grads, tensor_shapes
      ):
          if tensor_shape is None:
              continue
          p2p_communication.send_backward(
              input_tensor_grad,
              tensor_shape=tensor_shape,
              dtype=dtype,
              async_comm=async_comm,
              sequence_parallel_enabled=sequence_parallel_enabled,
              sync_batch_comm=sync_batch_comm,
          )
  
imports: import contextlib
  from typing import Any, List, Optional, Sequence, Union
  import warnings
  import torch
  from apex.transformer import parallel_state
  from apex.transformer.enums import ModelType
  from apex.transformer.pipeline_parallel import p2p_communication
  from apex.transformer.pipeline_parallel.p2p_communication import FutureTensor
  from apex.transformer.pipeline_parallel.utils import get_kth_microbatch
  from apex.transformer.pipeline_parallel.utils import listify_model
  from apex.transformer.pipeline_parallel.utils import get_num_microbatches
  from apex.transformer.pipeline_parallel.utils import get_model_type
  from apex.transformer.pipeline_parallel.schedules.common import Batch
  from apex.transformer.pipeline_parallel.schedules.common import FwdStepFunc
  from apex.transformer.pipeline_parallel.schedules.common import backward_step
  from apex.transformer.pipeline_parallel.schedules.common import forward_step
  from apex.transformer.pipeline_parallel.schedules.common import free_output_tensor
  from apex.transformer.log_util import get_transformer_logger
label_desc: Use image node_id 5 for calling a global function with example usage: send_backward(input_tensor_grads, tensor_shapes) without return types