code: def format_summary(translation):
      """Transforms the output of the `from_batch` function
      into nicely formatted summaries.
      """
      raw_summary, _, _ = translation
      summary = (
          raw_summary.replace("[unused0]", "")
          .replace("[unused3]", "")
          .replace("[PAD]", "")
          .replace("[unused1]", "")
          .replace(r" +", " ")
          .replace(" [unused2] ", ". ")
          .replace("[unused2]", "")
          .strip()
      )
  
      return summary
  
imports: import argparse
  import logging
  import os
  import sys
  from collections import namedtuple
  import torch
  from torch.utils.data import DataLoader, SequentialSampler
  from tqdm import tqdm
  from modeling_bertabs import BertAbs, build_predictor
  from transformers import BertTokenizer
  from .utils_summarization import CNNDMDataset, build_mask, compute_token_type_ids, encode_for_summarization, truncate_or_pad
label_desc: Use image node_id 3 for calling a global function with example usage: format_summary(translation) and returns: summary