code: def unmap_with_copy(indices, src_tokens, vocab):
      """
      Unmap a list of list of indices, by optionally copying from src_tokens.
      """
      result = []
      for ind, tokens in zip(indices, src_tokens):
          words = []
          for idx in ind:
              if idx >= 0:
                  words.append(vocab.id2word[idx])
              else:
                  idx = -idx - 1  # flip and minus 1
                  words.append(tokens[idx])
          result += [words]
      return result
  
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 7 for calling a global function with example usage: unmap_with_copy(indices, src_tokens, vocab) and returns: result