code: def test_wn18rr():
      wn18rr = load_wn18rr()
  
      ent_train = np.union1d(
          np.unique(wn18rr["train"][:, 0]),
          np.unique(wn18rr["train"][:, 2]),
      )
      ent_valid = np.union1d(
          np.unique(wn18rr["valid"][:, 0]),
          np.unique(wn18rr["valid"][:, 2]),
      )
      ent_test = np.union1d(
          np.unique(wn18rr["test"][:, 0]),
          np.unique(wn18rr["test"][:, 2]),
      )
      distinct_ent = np.union1d(
          np.union1d(ent_train, ent_valid), ent_test
      )
      distinct_rel = np.union1d(
          np.union1d(
              np.unique(wn18rr["train"][:, 1]),
              np.unique(wn18rr["train"][:, 1]),
          ),
          np.unique(wn18rr["train"][:, 1]),
      )
  
      assert len(wn18rr["train"]) == 86835
  
      # - 210 because 210 triples containing unseen entities are removed
      assert len(wn18rr["valid"]) == 3034 - 210
  
      # - 210 because 210 triples containing unseen entities are removed
      assert len(wn18rr["test"]) == 3134 - 210
  
file_path: AmpliGraph/tests/ampligraph/datasets/test_datasets.py
imports: from ampligraph.datasets import load_wn18, load_fb15k, load_fb15k_237, load_yago3_10, load_wn18rr, load_wn11, load_fb13
  from ampligraph.datasets.datasets import _clean_data
  import os
  import numpy
  import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_wn18rr() without return types