code: def create_data_points(temp_file, answer_only_loss=True):
      """
      Saves mock data in the temp_file, and return the expected output of the collate function
      """
      # explanation of data:
      # input_ids: concatenated (packed) sequences that each end in EOS (index = 2)
      # loss_mask: 0 denotes context, 1 denotes answer
      # seq_start_id: start index of each sequence in the pack
      output_data = [
          {
              "input_ids": [
                  10,
                  11,
                  12,
                  2,
                  20,
                  21,
                  22,
                  23,
                  2,
                  30,
                  31,
                  32,
                  2,
              ],
              "loss_mask": [0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1],
              "seq_start_id": [0, 4, 9],
          },
          {
              "input_ids": [
                  10,
                  11,
                  12,
                  2,
                  20,
                  21,
                  22,
                  23,
                  2,
                  30,
                  31,
                  32,
                  33,
                  34,
                  35,
                  2,
              ],
              "loss_mask": [
                  0,
                  0,
                  1,
                  1,
                  0,
                  0,
                  0,
                  1,
                  1,
                  0,
                  1,
                  1,
                  1,
                  1,
                  1,
                  1,
              ],
              "seq_start_id": [0, 4, 9],
          },
      ]
  
      expected_output = [
          {
              "tokens": [10, 11, 12, 20, 21, 22, 23, 30, 31, 32],
              "labels": [11, 12, 2, 21, 22, 23, 2, 31, 32, 2],
              "loss_mask": [0, 1, 1, 0, 0, 1, 1, 1, 1, 1]
              if answer_only_loss
              else [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
              "position_ids": [0, 1, 2, 0, 1, 2, 3, 0, 1, 2],
              "cu_seqlens": [0, 3, 7, 10],
          },
          {
              "tokens": [
                  10,
                  11,
                  12,
                  20,
                  21,
                  22,
                  23,
                  30,
                  31,
                  32,
                  33,
                  34,
                  35,
              ],
              "labels": [
                  11,
                  12,
                  2,
                  21,
                  22,
                  23,
                  2,
                  31,
                  32,
                  33,
                  34,
                  35,
                  2,
              ],
              "loss_mask": [0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]
              if answer_only_loss
              else [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
              "position_ids": [0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5],
              "cu_seqlens": [0, 3, 7, 13],
          },
      ]
  
      np.save(temp_file, output_data)
      return expected_output
  
file_path: NeMo/tests/collections/nlp/test_packed_sft_dataset.py
imports: import os
  import numpy
  import pytest
  from nemo.collections.nlp.data.language_modeling.megatron.gpt_sft_dataset import GPTSFTPackedDataset
  from nemo.collections.nlp.modules.common.tokenizer_utils import get_nmt_tokenizer
label_desc: Use image node_id 1 for calling a global function with example usage: create_data_points(temp_file, answer_only_loss) and returns: expected_output