class_docstr: Synthetic Reasoning Natural Language benchmark inspired by "Transformers as Soft Reasoners over Language"
      https://arxiv.org/abs/2002.05867
code: def get_instances(self) -> List[Instance]:
      # Read all the instances
      instances: List[Instance] = []
      random.seed(self.random_seed)
  
      for sample_idx in range(
          self.num_train_instances
          + self.num_val_instances
          + self.num_test_instances
      ):
          (
              rules,
              test_fact,
              test_rules_used,
              target_fact,
          ) = self.generate_problem()
  
          question = "\n".join(str(rule) for rule in rules) + "\n"
          test_specified_subject = test_fact.generate_specified_subject(
              upper=False
          )
          question += f"Fact:\n{test_fact}\n"
          if self.include_intermediates:
              question += (
                  "Rule(s) used:\n"
                  + "\n".join(
                      str(test_rule) for test_rule in test_rules_used
                  )
                  + "\n"
              )
          question += f"The following can be determined about {test_specified_subject}:"
  
          if sample_idx < self.num_train_instances:
              split = TRAIN_SPLIT
          elif (
              sample_idx
              < self.num_train_instances + self.num_val_instances
          ):
              split = VALID_SPLIT
          else:
              split = TEST_SPLIT
  
          instance = Instance(
              input=Input(text=question),
              references=[
                  Reference(
                      Output(text=str(target_fact)), tags=[CORRECT_TAG]
                  )
              ],
              split=split,
          )
          instances.append(instance)
  
      return instances
  
imports: import random
  import dataclasses
  from copy import copy
  from typing import List, Dict, Literal, Tuple
  from dataclasses import dataclass
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, VALID_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 3 for calling the SRNScenario obj's underlying member method code with example usage: obj.get_instances() and returns: instances