code: def _iter_predict_triples_inputs() -> (
      Iterable[
          Tuple[
              pykeen.models.Model,
              AnyTriples,
              Optional[CoreTriplesFactory],
              Optional[int],
          ]
      ]
  ):
      """Iterate over test inputs for predict_triples."""
      dataset = Nations()
      factory = dataset.training
      model = pykeen.models.mocks.FixedModel(triples_factory=factory)
      mapped_triples = factory.mapped_triples[:3]
      # mapped triples, automatic batch size selection, no factory
      yield model, mapped_triples, None, None
      # mapped triples, fixed batch size, no factory
      yield model, mapped_triples, None, 2
      # labeled triples with factory
      labeled = factory.label_triples(mapped_triples)
      yield model, labeled, factory, None
      # labeled triples as list
      labeled_list = labeled.tolist()
      yield model, labeled_list, factory, None
      # single labeled triple
      yield model, labeled_list[0], factory, None
      # model with inverse relations
      dataset = Nations(create_inverse_triples=True)
      factory = dataset.training
      model = pykeen.models.mocks.FixedModel(triples_factory=factory)
      yield model, factory.mapped_triples[:3], None, 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 7 for calling a global function with example usage: _iter_predict_triples_inputs() without return types