code: def test_predict_top_k_consistency():
      """Test consistency of top-k scoring."""
      ks = [5, 10]
      model = pykeen.models.mocks.FixedModel(
          triples_factory=KGInfo(
              num_entities=3,
              num_relations=5,
              create_inverse_triples=False,
          )
      )
      dfs = [
          pykeen.predict.predict_all(model=model, k=k)
          .process()
          .df.nlargest(n=min(ks), columns="score")
          .reset_index(drop=True)
          for k in ks
      ]
      assert set(dfs[0].columns) == set(dfs[0].columns)
      for column in dfs[0].columns:
          numpy.testing.assert_equal(
              dfs[0][column].values, dfs[1][column].values
          )
  
imports: from typing import Any, Collection, Iterable, MutableMapping, Optional, Sequence, Tuple, Union
  import numpy
  import pandas
  import pytest
  import torch
  import unittest_templates
  import pykeen.models
  import pykeen.models.mocks
  import pykeen.predict
  import pykeen.regularizers
  import pykeen.typing
  from pykeen.constants import COLUMN_LABELS
  from pykeen.datasets.nations import Nations
  from pykeen.triples.triples_factory import AnyTriples, CoreTriplesFactory, KGInfo
  from pykeen.utils import resolve_device
  from tests import cases
label_desc: Use image node_id 6 for calling a global function with example usage: test_predict_top_k_consistency() without return types