class_docstr: Fact Completion task using knowledge from WikiData.
  Data constructed using the dump at https://dumps.wikimedia.org/wikidatawiki/entities/latest-all.json.gz
  
  We prompt models using the following format
  
      Input sequence:
          <subject> <predicate>
      Output Sequence (Target completion):
          <object>
  
  Using an example from the training dataset, we have
  
      Doug Eckerty is an instance of human
      Chegerd, Khash is an instance of village
      S. George Ellsworth is an instance of
      Target completion:
          human
code: def get_instances(self) -> List[Instance]:
      # Download the raw data
      data_path: str = os.path.join(self.output_path, "data")
      ensure_directory_exists(data_path)
  
      # Read all the instances
      instances: List[Instance] = []
      splits = {
          "train": TRAIN_SPLIT,
          "dev": VALID_SPLIT,
          "test": TEST_SPLIT,
      }
  
      for split in splits:
          split_file_name: str = f"{split}.jsonl"
          json_path: str = os.path.join(data_path, split_file_name)
          ensure_file_downloaded(
              source_url="https://worksheets.codalab.org/rest/bundles/0x8c3b60eb7c6b462e822a150f194d3b35/"
              f"contents/blob/{split_file_name}",
              target_path=json_path,
              unpack=False,
          )
  
          hlog(f"Reading {json_path}")
          with open(json_path) as f:
              all_raw_data = f.readlines()
          for line in all_raw_data:
              raw_data = json.loads(line)
              if raw_data["property"] != NAME_TO_PID[self.subject]:
                  continue
  
              question: str = raw_data["template"]
              answers: List[str] = flatten_list(
                  raw_data["result_names"]
              )
  
              def answer_to_reference(answer: str) -> Reference:
                  return Reference(
                      Output(text=answer.strip()), tags=[CORRECT_TAG]
                  )
  
              instance = Instance(
                  input=Input(text=question),
                  references=list(map(answer_to_reference, answers)),
                  split=splits[split],
              )
              instances.append(instance)
  
      return instances
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/scenarios/wikifact_scenario.py
imports: import os
  from typing import List, Dict
  import json
  from helm.common.general import ensure_directory_exists, ensure_file_downloaded, flatten_list
  from helm.common.hierarchical_logger import hlog
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, VALID_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 2 for calling the WIKIFactScenario obj's underlying member method code with example usage: obj.get_instances() and returns: instances, Reference