code: def test_mcmc_helper_target_function_unconstrained() -> None:
      """
      Verifies the objective for a set of priors which are defined on the unconstrained space.
      """
      # Set up priors on the model parameters such that we can readily compute their expected values.
      expected_log_prior = 0.0
      prior_width = 200.0
  
      data = build_data()
      model = build_model_with_uniform_prior_no_transforms(
          data, PriorOn.UNCONSTRAINED, prior_width
      )
  
      hmc_helper = gpflow.optimizers.SamplingHelper(
          model.log_posterior_density, model.trainable_parameters
      )
  
      for _ in model.trainable_parameters:
          prior_density = 1 / prior_width
          expected_log_prior += np.log(prior_density)
  
      target_log_prob_fn = hmc_helper.target_log_prob_fn
      expected_log_prob = (
          model.log_marginal_likelihood().numpy() + expected_log_prior
      )
  
      np.testing.assert_allclose(
          target_log_prob_fn(), expected_log_prob
      )
  
imports: from typing import Tuple
  import numpy
  import pytest
  import tensorflow
  import tensorflow_probability
  from check_shapes import ShapeChecker, check_shapes
  from tensorflow_probability.python.distributions import Gamma, Uniform
  import gpflow
  from gpflow.base import AnyNDArray, PriorOn
  from gpflow.models import GPR
  from gpflow.utilities import to_default_float
label_desc: Use image node_id 6 for calling a global function with example usage: test_mcmc_helper_target_function_unconstrained() without return types