code: def test_agenda_indices_are_correct(self):
      reader = NlvrDatasetReader()
      test_file = unicode(
          self.FIXTURES_ROOT
          / "data"
          / "nlvr"
          / "sample_ungrouped_data.jsonl"
      )
      dataset = reader.read(test_file)
      instances = list(dataset)
      instance = instances[0]
      sentence_tokens = instance.fields["sentence"].tokens
      sentence = " ".join([t.text for t in sentence_tokens])
      agenda = [
          item.sequence_index
          for item in instance.fields["agenda"].field_list
      ]
      actions = [
          action.rule
          for action in instance.fields["actions"].field_list
      ]
      agenda_actions = [actions[i] for i in agenda]
      world = instance.fields["worlds"].field_list[0].as_tensor({})
      expected_agenda_actions = world.get_agenda_for_sentence(
          sentence, add_paths_to_agenda=False
      )
      assert expected_agenda_actions == agenda_actions
  
file_path: magnitude/pymagnitude/third_party/allennlp/tests/data/dataset_readers/nlvr_test.py
imports: from __future__ import division
  from __future__ import absolute_import
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.data.dataset_readers import NlvrDatasetReader
  from allennlp.semparse.worlds import NlvrWorld
label_desc: Use image node_id 2 for calling the TestNlvrDatasetReader obj's underlying member method code with example usage: obj.test_agenda_indices_are_correct() without return types