class_docstr: Maintains state of the Parser. Useful for beam search
class_docstr_tok: ["Maintains","state","of","the","Parser",".","Useful","for","beam","search"]
code: def copy(self):
      other = ParserState()
      other.buffer_stackrnn = self.buffer_stackrnn.copy()
      other.stack_stackrnn = self.stack_stackrnn.copy()
      other.action_stackrnn = self.action_stackrnn.copy()
      other.predicted_actions_idx = self.predicted_actions_idx.copy()
      other.action_scores = self.action_scores.copy()
      other.num_open_NT = self.num_open_NT
      other.is_open_NT = self.is_open_NT.copy()
      other.neg_prob = self.neg_prob
      other.found_unsupported = self.found_unsupported
  
      # detach to avoid making copies, only called in inference to share data
      other.action_p = self.action_p.detach()
      return other
  
imports: from typing import Any, List, Sized, Tuple
  import torch
  import torch.nn
  from pytext.torchscript.utils import reverse_tensor_list
  from pytext.utils.cuda import FloatTensor
  from pytext.utils.tensor import xaviervar
label_desc: Use image node_id 3 for calling the ParserState obj's underlying member method code with example usage: obj.copy() and returns: other