code: def make_history_mask_3d(block):
      batch, length = block.shape
      arange = torch.arange(length, device=block.device)
      history_mask = (arange[None,] <= arange[:, None])[None,]
      history_mask = history_mask.expand(batch, length, length)
      return history_mask
  
file_path: megatron-lm/megatron/data/t5_dataset.py
imports: import collections
  import numpy
  import torch
  from megatron import get_tokenizer
  from megatron.data.dataset_utils import create_masked_lm_predictions, get_samples_mapping
label_desc: Use image node_id 6 for calling a global function with example usage: make_history_mask_3d(block) and returns: history_mask