docstr: Create `attention_mask`.
  Args:
      input_ids: A 1D tensor that holds the indices of tokens.
docstr_tok: ["Create","`","attention_mask","`",".","Args",":","input_ids",":","A","1D","tensor","that","holds","the","indices","of","tokens","."]
code: def _create_attention_mask(self, max_length):
      """Create `attention_mask`.
      Args:
          input_ids: A 1D tensor that holds the indices of tokens.
      """
      # seq_length = len(input_ids)
      # `attention_mask` has the shape of [1, seq_length, seq_length]
      attention_mask = torch.tril(
          torch.ones((max_length, max_length))
      ).unsqueeze(0)
      attention_mask = attention_mask < 0.5
      return attention_mask
  
imports: import re
  from typing import List, Mapping, Optional
  import datasets
  import numpy
  import torch
  from datasets import load_dataset
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.data.language_modeling.megatron.dataset_utils import get_samples_mapping
  from nemo.collections.nlp.data.language_modeling.text_memmap_dataset import JSONLMemMapDataset
  from nemo.core.classes import Dataset
  from nemo.utils import logging
label_desc: Use image node_id 13 for calling the GPTSFTDataset obj's underlying member method code with example usage: obj._create_attention_mask(max_length) and returns: attention_mask