code: def make_attention_mask(source_block, target_block):
      """
      Returns a 2-dimensional (2-D) attention mask
      :param source_block: 1-D array
      :param target_block: 1-D array
      """
      mask = (target_block[None, :] >= 1) * (source_block[:, None] >= 1)
      mask = mask.astype(np.int64)
      # (source_length, target_length)
      return mask
  
file_path: ColossalAI/examples/tutorial/sequence_parallel/data/datasets/ict_dataset.py
imports: import itertools
  import random
  import numpy
  from megatron import get_args, get_tokenizer
  from megatron.data.dataset_utils import get_indexed_dataset_
  from megatron.data.realm_dataset_utils import get_block_samples_mapping
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 for calling a global function with example usage: make_attention_mask(source_block, target_block) and returns: mask