code: def get_answer_begin_end(data):
      """
      Get answer's index of begin and end.
      """
      begin = []
      end = []
      for qa_pair in data:
          tokens = qa_pair["passage_tokens"]
          char_begin = qa_pair["answer_begin"]
          char_end = qa_pair["answer_end"]
          word_begin = get_word_index(tokens, char_begin)
          word_end = get_word_index(tokens, char_end)
          begin.append(word_begin)
          end.append(word_end)
      return np.asarray(begin), np.asarray(end)
  
file_path: nni/examples/trials/ga_squad/data.py
imports: import csv
  import json
  from random import shuffle
  import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: get_answer_begin_end(data) and returns: np,  np