code: def _knowledge_graph_load(dataset, nodes, rels, train, test, valid):
      g, train_df, test_df, valid_df = dataset.load()
  
      assert g.number_of_nodes() == nodes
      assert g.number_of_edges() == train + test + valid
      assert (
          len({et for _, _, et in g.edges(include_edge_type=True)})
          == rels
      )
  
      assert len(train_df) == train
      assert len(test_df) == test
      assert len(valid_df) == valid
  
      cols = {"source", "label", "target"}
      assert set(train_df.columns) == cols
      assert set(test_df.columns) == cols
      assert set(valid_df.columns) == cols
  
imports: import pytest
  import tempfile
  import os
  import sys
  import numpy
  from stellargraph.datasets import *
  from urllib.error import URLError
  from stellargraph.datasets.dataset_loader import DatasetLoader
  from urllib.request import urlretrieve
  from unittest.mock import patch
label_desc: Use image node_id 16 for calling a global function with example usage: _knowledge_graph_load(dataset, nodes, rels, train, test, valid) without return types