code: def _register_posterior_bo_integration_test(
      request: SubRequest,
      tested_posteriors: DefaultDict[str, Set[Type[AbstractPosterior]]],
  ) -> Callable[[AbstractPosterior], None]:
      def _register_posterior(posterior: AbstractPosterior) -> None:
          tested_posteriors[request.function.__name__].add(
              posterior.__class__
          )
  
      return _register_posterior
  
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 1 for calling a global function with example usage: _register_posterior_bo_integration_test(request, tested_posteriors) and returns: _register_posterior