class_docstr: Represents the (batched) state of a transition-based decoder.
  
  There are two different kinds of batching we need to distinguish here.  First, there's the
  batch of training instances passed to ``model.forward()``.  We'll use "batch" and
  ``batch_size`` to refer to this through the docs and code.  We additionally batch together
  computation for several states at the same time, where each state could be from the same
  training instance in the original batch, or different instances.  We use "group" and
  ``group_size`` in the docs and code to refer to this kind of batching, to distinguish it from
  the batch of training instances.
  
  So, using this terminology, a single ``DecoderState`` object represents a `grouped` collection
  of states.  Because different states in this group might finish at different timesteps, we have
  methods and member variables to handle some bookkeeping around this, to split and regroup
  things.
  
  Parameters
  ----------
  batch_indices : ``List[int]``
      A ``group_size``-length list, where each element specifies which ``batch_index`` that group
      element came from.
  
      Our internal variables (like scores, action histories, hidden states, whatever) are
      `grouped`, and our ``group_size`` is likely different from the original ``batch_size``.
      This variable keeps track of which batch instance each group element came from (e.g., to
      know what the correct action sequences are, or which encoder outputs to use).
  action_history : ``List[List[int]]``
      The list of actions taken so far in this state.  This is also grouped, so each state in the
      group has a list of actions.
  score : ``List[torch.Tensor]``
      This state's score.  It's a variable, because typically we'll be computing a loss based on
      this score, and using it for backprop during training.  Like the other variables here, this
      is a ``group_size``-length list.
class_docstr_tok: ["Represents","the","(","batched",")","state","of","a","transition-based","decoder",".","There","are","two","different","kinds","of","batching","we","need","to","distinguish","here",".","First",",","there","'s","the","batch","of","training","instances","passed","to","``","model.forward","(",")","``",".","We","'ll","use","``","batch","''","and","``","batch_size","``","to","refer","to","this","through","the","docs","and","code",".","We","additionally","batch","together","computation","for","several","states","at","the","same","time",",","where","each","state","could","be","from","the","same","training","instance","in","the","original","batch",",","or","different","instances",".","We","use","``","group","''","and","``","group_size","``","in","the","docs","and","code","to","refer","to","this","kind","of","batching",",","to","distinguish","it","from","the","batch","of","training","instances",".","So",",","using","this","terminology",",","a","single","``","DecoderState","``","object","represents","a","`","grouped","`","collection","of","states",".","Because","different","states","in","this","group","might","finish","at","different","timesteps",",","we","have","methods","and","member","variables","to","handle","some","bookkeeping","around","this",",","to","split","and","regroup","things",".","Parameters","--","--","--","--","--","batch_indices",":","``","List","[","int","]","``","A","``","group_size","``","-length","list",",","where","each","element","specifies","which","``","batch_index","``","that","group","element","came","from",".","Our","internal","variables","(","like","scores",",","action","histories",",","hidden","states",",","whatever",")","are","`","grouped","`",",","and","our","``","group_size","``","is","likely","different","from","the","original","``","batch_size","``",".","This","variable","keeps","track","of","which","batch","instance","each","group","element","came","from","(","e.g.",",","to","know","what","the","correct","action","sequences","are",",","or","which","encoder","outputs","to","use",")",".","action_history",":","``","List","[","List","[","int","]","]","``","The","list","of","actions","taken","so","far","in","this","state",".","This","is","also","grouped",",","so","each","state","in","the","group","has","a","list","of","actions",".","score",":","``","List","[","torch.Tensor","]","``","This","state","'s","score",".","It","'s","a","variable",",","because","typically","we","'ll","be","computing","a","loss","based","on","this","score",",","and","using","it","for","backprop","during","training",".","Like","the","other","variables","here",",","this","is","a","``","group_size","``","-length","list","."]
docstr: Combines a list of states, each with their own group size, into a single state.
docstr_tok: ["Combines","a","list","of","states",",","each","with","their","own","group","size",",","into","a","single","state","."]
code: def combine_states(cls, states):
      """
      Combines a list of states, each with their own group size, into a single state.
      """
      raise NotImplementedError
  
imports: from __future__ import absolute_import
  import torch
label_desc: Use image node_id 3 for calling the DecoderState obj's underlying member method code with example usage: obj.combine_states(cls, states) without return types