code: def free_output_tensor(
      output_tensors: Optional[
          Union[torch.Tensor, Sequence[torch.Tensor]]
      ],
      deallocate_pipeline_outputs: bool = False,
  ) -> None:
      """Pseudo-free the output tensor's `.data` field.
  
      This method should be called right after the output tensor has been sent to the next
      pipeline stage. At this point, the output tensor is only useful for its `.grad_fn` field,
      and not its `.data`.
      """
      if not deallocate_pipeline_outputs:
          return
      if output_tensors is None:
          return
      if isinstance(output_tensors, torch.Tensor):
          output_tensors = [output_tensors]
      for output_tensor in output_tensors:
          output_tensor.data = torch.cuda.FloatTensor([0])
  
file_path: apex/apex/transformer/pipeline_parallel/schedules/common.py
imports: from typing import Any, Callable, Dict, List, Tuple, Union, Optional, Sequence
  import torch
  from torch.autograd.variable import Variable
  from apex.normalization.fused_layer_norm import FusedLayerNorm
  from apex.transformer import parallel_state
  from apex.transformer.enums import ModelType
  from apex.transformer.pipeline_parallel.p2p_communication import FutureTensor
  from apex.transformer.pipeline_parallel.utils import get_num_microbatches
  from apex.transformer.pipeline_parallel.utils import listify_model
  from apex.transformer.pipeline_parallel.utils import unwrap_model
  from apex.transformer.pipeline_parallel.utils import get_model_type
  from apex.transformer.tensor_parallel.layers import set_defaults_if_not_set_tensor_model_parallel_attributes
  from apex.transformer.log_util import get_transformer_logger
label_desc: Use image node_id 4 for calling a global function with example usage: free_output_tensor(output_tensors, deallocate_pipeline_outputs) without return types