code: def parse_align_idx(align_pharaoh):
      """
      Parse Pharaoh alignment into [[<src>, <tgt>], ...]
      """
      align_list = align_pharaoh.strip().split(" ")
      flatten_align_idx = []
      for align in align_list:
          try:
              src_idx, tgt_idx = align.split("-")
          except ValueError:
              logger.warning("{} in `{}`".format(align, align_pharaoh))
              logger.warning(
                  "Bad alignement line exists. Please check file!"
              )
              raise
          flatten_align_idx.append([int(src_idx), int(tgt_idx)])
      return flatten_align_idx
  
file_path: OpenNMT-py/onmt/inputters/text_utils.py
imports: import torch
  import pyonmttok
  from onmt.constants import DefaultTokens, CorpusTask, ModelTask
  from torch.nn.utils.rnn import pad_sequence
  from onmt.utils.logging import logger
  from collections import Counter
label_desc: Use image node_id 7 for calling a global function with example usage: parse_align_idx(align_pharaoh) and returns: flatten_align_idx