code: def send_forward_recv_backward(
      self,
      model_chunk_id_send: int,
      model_chunk_id_recv: int,
      output_tensor: Any,
      next_rank: Optional[int] = None,
      send_prior_fallback: Optional[bool] = None,
  ) -> Any:
      with self.stage_manager.switch_model_chunk_id(
          model_chunk_id_send
      ):
          send_data = not self.stage_manager.is_last_stage()
      with self.stage_manager.switch_model_chunk_id(
          model_chunk_id_recv
      ):
          recv_data = not self.stage_manager.is_last_stage()
  
      if send_data and recv_data:
          if (
              not self.send_forward_recv_backward
              and self.grad_metadata_recv is not None
          ):
              send_prior_fallback = None  # must not fallback
          output_tensor_grad = self.comm.send_forward_recv_backward(
              output_tensor,
              next_rank,
              send_metadata=self.send_tensor_metadata,
              metadata_recv=self.grad_metadata_recv,
              send_prior_fallback=send_prior_fallback,
          )
          self.send_tensor_metadata = not self.enable_metadata_cache
          if (
              self.enable_metadata_cache
              and self.grad_metadata_recv is None
          ):
              self.grad_metadata_recv = create_send_metadata(
                  output_tensor_grad
              )
          return output_tensor_grad
  
      # send only or recv only
      self.send_forward(model_chunk_id_send, output_tensor)
      return self.recv_backward(model_chunk_id_recv)
  
imports: from functools import partial
  from typing import Any, Callable, Dict, Iterable, List, Optional, Union
  import torch
  import torch.cuda
  from torch.nn import Module, ModuleList
  from torch.utils._pytree import tree_map
  from colossalai.interface import OptimizerWrapper
  from colossalai.pipeline.p2p import PipelineP2PCommunication, create_send_metadata
  from colossalai.pipeline.stage_manager import PipelineStageManager
  from colossalai.utils.device import get_current_device
  from ._utils import detach, get_batch_size, get_micro_batch, merge_batch, model_forward, retain_grad, to_device
  from .base import PipelineSchedule
label_desc: Use image node_id 9 for calling the InterleavedSchedule obj's underlying member method code with example usage: obj.send_forward_recv_backward(model_chunk_id_send, model_chunk_id_recv, output_tensor, next_rank, send_prior_fallback) and returns: self, output_tensor_grad