code: def test_reader_reads_processed_data(self):
      # Processed data contains action sequences that yield the correct denotations, obtained from
      # an offline search.
      test_file = unicode(
          self.FIXTURES_ROOT
          / "data"
          / "nlvr"
          / "sample_processed_data.jsonl"
      )
      dataset = NlvrDatasetReader().read(test_file)
      instances = list(dataset)
      assert len(instances) == 2
      instance = instances[0]
      assert list(instance.fields.keys()) == set(
          [
              "sentence",
              "target_action_sequences",
              "worlds",
              "actions",
              "labels",
              "identifier",
          ]
      )
      all_action_sequence_indices = instance.fields[
          "target_action_sequences"
      ].field_list
      assert len(all_action_sequence_indices) == 20
      action_sequence_indices = [
          item.sequence_index
          for item in all_action_sequence_indices[0].field_list
      ]
      actions = [
          action.rule
          for action in instance.fields["actions"].field_list
      ]
      action_sequence = [
          actions[rule_id] for rule_id in action_sequence_indices
      ]
      assert action_sequence == [
          "@start@ -> t",
          "t -> [<o,t>, o]",
          "<o,t> -> object_exists",
          "o -> [<o,o>, o]",
          "<o,o> -> touch_corner",
          "o -> [<o,o>, o]",
          "<o,o> -> circle",
          "o -> all_objects",
      ]
  
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 4 for calling the TestNlvrDatasetReader obj's underlying member method code with example usage: obj.test_reader_reads_processed_data() without return types