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 finished(self):
      return (
          len(self.stack_stackrnn) == 1
          and len(self.buffer_stackrnn) == 0
      )
  
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 2 for calling the ParserState obj's underlying member method code with example usage: obj.finished() and returns: unknown