examples/research_projects/bertabs/modeling_bertabs.py/TransformerDecoderState/_all
class TransformerDecoderState:    def _all(self):
        """
        Contains attributes that need to be updated in self.beam_update().
        """
        if self.previous_input is not None and self.previous_layer_inputs is not None:
            return (self.previous_input, self.previous_layer_inputs, self.src)
        else:
            return (self.src,)