code: def _check_score_pack(
      pack: pykeen.predict.ScorePack,
      model: pykeen.models.Model,
      num_triples: int,
  ):
      """Check store pack properties."""
      assert isinstance(pack, pykeen.predict.ScorePack)
      # check type
      assert isinstance(pack.result, torch.Tensor)
      assert pack.result.dtype == torch.long
      assert isinstance(pack.scores, torch.Tensor)
      assert pack.scores.is_floating_point()
      # check shape
      assert pack.result.shape == (num_triples, 3)
      assert pack.scores.shape == (num_triples,)
      # check ID ranges
      assert (pack.result >= 0).all()
      assert pack.result[:, [0, 2]].max() < model.num_entities
      assert pack.result[:, 1].max() < model.num_relations
  
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 4 for calling a global function with example usage: _check_score_pack(pack, model, num_triples) without return types