docstr: Read and parse the file specified by `file_path`. The file format is
  specified by each individual task-specific base class. Returns all
  the indices of data items in this file w.r.t. the whole dataset.
  For Text2TextDataset, the format of the input file should contain
  lines of input, each line representing one record of data. The input
  and output is separated by a tab(       ).
  
  Parameters
  ----------
  file_path: str
      The path of the input file.
  Returns
  -------
  list
      The indices of data items in the file w.r.t. the whole dataset.
docstr_tok: ["Read","and","parse","the","file","specified","by","`","file_path","`",".","The","file","format","is","specified","by","each","individual","task-specific","base","class",".","Returns","all","the","indices","of","data","items","in","this","file","w.r.t",".","the","whole","dataset",".","For","Text2TextDataset",",","the","format","of","the","input","file","should","contain","lines","of","input",",","each","line","representing","one","record","of","data",".","The","input","and","output","is","separated","by","a","tab","(",")",".","Parameters","--","--","--","--","--","file_path",":","str","The","path","of","the","input","file",".","Returns","--","--","--","-","list","The","indices","of","data","items","in","the","file","w.r.t",".","the","whole","dataset","."]
code: def parse_file(self, file_path):
      """
      Read and parse the file specified by `file_path`. The file format is
      specified by each individual task-specific base class. Returns all
      the indices of data items in this file w.r.t. the whole dataset.
      For Text2TextDataset, the format of the input file should contain
      lines of input, each line representing one record of data. The input
      and output is separated by a tab(\t).
  
      Parameters
      ----------
      file_path: str
          The path of the input file.
      Returns
      -------
      list
          The indices of data items in the file w.r.t. the whole dataset.
      """
      data = []
      with open(file_path, "r") as f:
          examples = json.load(f)
          for example_dict in examples:
              input = " ".join(
                  " ".join(example_dict["article"]).split()[:400]
              ).lower()
              output = " ".join(
                  " ".join(
                      [
                          "<t> " + sent[0] + " . </t>"
                          for sent in example_dict["highlight"]
                      ]
                  ).split()[:99]
              ).lower()
              if input == "" or output == "":
                  continue
              data_item = Text2TextDataItem(
                  input_text=input,
                  output_text=output,
                  tokenizer=self.tokenizer,
                  share_vocab=self.share_vocab,
              )
              data.append(data_item)
      return data
  
file_path: graph4nlp/graph4nlp/pytorch/datasets/cnn.py
imports: import json
  import torch
  from nltk.tokenize import word_tokenize
  from graph4nlp.pytorch.data.dataset import Text2TextDataItem, Text2TextDataset
  from graph4nlp.pytorch.modules.utils.padding_utils import pad_2d_vals, pad_2d_vals_no_size
label_desc: Use image node_id 5 for calling the CNNDataset obj's underlying member method code with example usage: obj.parse_file(file_path) and returns: data