code: def __init__(self, valid_actions=None, include_value_in_score=False):
      # The default allowed actions are adding 1 or 2 to the last element.
      self._valid_actions = valid_actions or set([1, 2])
      # If True, we will add a small multiple of the action take to the score, to encourage
      # getting higher numbers first (and to differentiate action sequences).
      self._include_value_in_score = include_value_in_score
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/nn/decoding/simple_transition_system.py
imports: from __future__ import absolute_import
  from collections import defaultdict
  import torch
  from allennlp.nn.decoding import DecoderState, DecoderStep
label_desc: Use image node_id 1 to create a new SimpleDecoderStep object from inherited base classes: DecoderStep with example: obj = SimpleDecoderStep(valid_actions, include_value_in_score)