code: def model_factory(
      multi_output: bool = False,
      atol: float = _DEFAULT_ATOL,
      rtol: float = _DEFAULT_RTOL,
  ) -> Callable[[_CreateModel[_M]], _ModelFactory[_M]]:
      """Decorator for adding a function to the `_MODEL_FACTORIES` list."""
  
      def register(create_model: _CreateModel[_M]) -> _ModelFactory[_M]:
          model_factory = _ModelFactory(
              create_model,
              multi_output,
              atol,
              rtol,
          )
          _MODEL_FACTORIES.append(model_factory)
          return model_factory
  
      return register
  
imports: from typing import Any, Callable, DefaultDict, Generic, Iterator, List, Set, Tuple, Type, TypeVar, cast
  import numpy
  import pytest
  import tensorflow
  from _pytest.fixtures import SubRequest
  from check_shapes import check_shapes
  import gpflow
  from gpflow.base import RegressionData
  from gpflow.config import default_float
  from gpflow.inducing_variables import InducingPoints, InducingVariables
  from gpflow.kernels import Kernel, Matern52
  from gpflow.likelihoods import Exponential, Likelihood
  from gpflow.models import GPR, SGPR, SVGP, VGP, GPModel, training_loss_closure
  from gpflow.models.vgp import update_vgp_data
  from gpflow.posteriors import AbstractPosterior, PrecomputeCacheType
label_desc: Use image node_id 2 for calling a global function with example usage: model_factory(multi_output, atol, rtol) and returns: register, model_factory