code: def process_batch_data(batch_data):
      (
          tokens,
          types,
          sentence_order,
          loss_mask,
          lm_labels,
          padding_mask,
      ) = batch_data
      if gpc.is_first_rank(ParallelMode.PIPELINE):
          data = dict(
              input_ids=tokens,
              attention_masks=padding_mask,
              tokentype_ids=types,
              lm_labels=lm_labels,
          )
      else:
          data = dict(
              attention_masks=padding_mask,
              tokentype_ids=types,
              lm_labels=lm_labels,
          )
      label = dict(loss_mask=loss_mask, sentence_order=sentence_order)
      return data, label
  
file_path: ColossalAI/examples/tutorial/sequence_parallel/train.py
imports: import argparse
  import torch
  from data.bert_helper import SequenceParallelDataIterator, get_batch_for_sequence_parallel
  from data.dummy_dataloader import DummyDataloader
  from loss_func.bert_loss import BertLoss
  from lr_scheduler import AnnealingLR
  from model.bert import BertForPretrain, build_pipeline_bert
  import colossalai
  from colossalai.kernel import LayerNorm
  from colossalai.legacy.amp import AMP_TYPE
  from colossalai.legacy.context.parallel_mode import ParallelMode
  from colossalai.legacy.core import global_context
  from colossalai.legacy.utils import is_using_pp
  from colossalai.logging import get_dist_logger
  from colossalai.nn.optimizer import FusedAdam
  from colossalai.utils import MultiTimer
label_desc: Use image node_id 1 for calling a global function with example usage: process_batch_data(batch_data) and returns: data,  label