code: def _iter_predict_all_inputs() -> (
      Iterable[
          Tuple[
              pykeen.models.Model,
              Optional[int],
              pykeen.typing.Target,
              int,
          ]
      ]
  ):
      """Iterate over test inputs for predict_all."""
      # use a small model, since operation is expensive
      num_entities, num_relations = 3, 2
      model = pykeen.models.mocks.FixedModel(
          triples_factory=KGInfo(
              num_entities=num_entities,
              num_relations=num_relations,
              create_inverse_triples=False,
          )
      )
      # all scores, automatic batch size
      yield model, None, pykeen.typing.LABEL_TAIL, None
      # top 3 scores
      yield model, 3, pykeen.typing.LABEL_TAIL, None
      # top 3 scores, fixed batch size, head scoring
      yield model, 3, pykeen.typing.LABEL_HEAD, 2
      # all scores, relation scoring
      yield model, 3, pykeen.typing.LABEL_RELATION, None
      # all scores, relation scoring
      yield model, 3, pykeen.typing.LABEL_RELATION, None
      # model with inverse relations
      model = pykeen.models.mocks.FixedModel(
          triples_factory=KGInfo(
              num_entities=num_entities,
              num_relations=num_relations,
              create_inverse_triples=True,
          )
      )
      yield model, None, pykeen.typing.LABEL_TAIL, None
  
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 3 for calling a global function with example usage: _iter_predict_all_inputs() without return types