code: def flatten_indices(seq_lens, width):
      flat = []
      for i, l in enumerate(seq_lens):
          for j in range(l):
              flat.append(i * width + j)
      return flat
  
file_path: stanza/stanza/models/common/seq2seq_utils.py
imports: from collections import Counter
  import random
  import json
  import torch
  import stanza.models.common.seq2seq_constant
label_desc: Use image node_id 3 for calling a global function with example usage: flatten_indices(seq_lens, width) and returns: flat