class_docstr: Single Test based on a dummy input.
docstr: Tests whether it could correctly extract 2-hop graph.
docstr_tok: ["Tests","whether","it","could","correctly","extract","2-hop","graph","."]
code: def test_graph_extraction(self):
      """Tests whether it could correctly extract 2-hop graph."""
      rel_list = [
          ["Q1066517", "r1", "Qdummy"],
          ["Q35581", "r2", "Qdummy"],
          ["Q2339039", "r2", "Qdummy"],
          ["Q753878", "r2", "Qdummy"],
      ]
      logging.info("Construct KG Graph from edge list.")
      kg_graph = data_util.construct_kg_graph(rel_list)
      logging.info("Extract 2-hop subgraphs within wiki-pages.")
      demo_data = self.demo_input()
      for d in demo_data:
          in_context_ents = {
              ent: True for ent in d["link"] if ent != "UNK"
          }
          graph = data_util.extract_2hop_graph(
              in_context_ents, kg_graph
          )
          print(graph)
          logging.info(len(graph))
  
imports: from absl import logging
  from absl.testing import absltest
  from scenic.projects.knowledge_visual_language.data.wikidata import data_util
label_desc: Use image node_id 1 for calling the ClipModelsTest obj's underlying member method code with example usage: obj.test_graph_extraction() without return types