docstr: Walk back to construct the full hypothesis.
  
  Parameters:
  
       * `k` - the position in the beam to construct.
  
   Returns: The hypothesis
code: def get_hyp(self, k):
      """
      Walk back to construct the full hypothesis.
  
      Parameters:
  
           * `k` - the position in the beam to construct.
  
       Returns: The hypothesis
      """
      hyp = []
      cpy = []
      for j in range(len(self.prevKs) - 1, -1, -1):
          hyp.append(self.nextYs[j + 1][k])
          if len(self.copy) > 0:
              cpy.append(self.copy[j][k])
          k = self.prevKs[j][k]
  
      hyp = hyp[::-1]
      cpy = cpy[::-1]
      # postprocess: if cpy index is not -1, use cpy index instead of hyp word
      for i, cidx in enumerate(cpy):
          if cidx >= 0:
              hyp[i] = -(
                  cidx + 1
              )  # make index 1-based and flip it for token generation
  
      return hyp
  
file_path: stanza/stanza/models/common/beam.py
imports: from __future__ import division
  import torch
  import stanza.models.common.seq2seq_constant
label_desc: Use image node_id 7 for calling the Beam obj's underlying member method code with example usage: obj.get_hyp(k) and returns: hyp