code: def gaussian_process_regression_models(
      draw,
      kernel_name=None,
      batch_shape=None,
      event_dim=None,
      feature_dim=None,
      feature_ndims=None,
      enable_vars=False,
  ):
      # First draw a kernel.
      k, _ = draw(
          kernel_hps.base_kernels(
              kernel_name=kernel_name,
              batch_shape=batch_shape,
              event_dim=event_dim,
              feature_dim=feature_dim,
              feature_ndims=feature_ndims,
              # Disable variables
              enable_vars=False,
          )
      )
      compatible_batch_shape = draw(
          tfp_hps.broadcast_compatible_shape(k.batch_shape)
      )
      index_points = draw(
          kernel_hps.kernel_input(
              batch_shape=compatible_batch_shape,
              example_ndims=1,
              feature_dim=feature_dim,
              feature_ndims=feature_ndims,
              enable_vars=enable_vars,
              name="index_points",
          )
      )
      hp.note("Index points:\n{}".format(repr(index_points)))
  
      observation_index_points = draw(
          kernel_hps.kernel_input(
              batch_shape=compatible_batch_shape,
              example_ndims=1,
              feature_dim=feature_dim,
              feature_ndims=feature_ndims,
              enable_vars=enable_vars,
              name="observation_index_points",
          )
      )
      hp.note(
          "Observation index points:\n{}".format(
              repr(observation_index_points)
          )
      )
  
      observations = draw(
          kernel_hps.kernel_input(
              batch_shape=compatible_batch_shape,
              example_ndims=1,
              # This is the example dimension suggested observation_index_points.
              example_dim=int(
                  observation_index_points.shape[-(feature_ndims + 1)]
              ),
              # No feature dimensions.
              feature_dim=0,
              feature_ndims=0,
              enable_vars=enable_vars,
              name="observations",
          )
      )
      hp.note("Observations:\n{}".format(repr(observations)))
  
      params = draw(
          broadcasting_params(
              "GaussianProcessRegressionModel",
              compatible_batch_shape,
              event_dim=event_dim,
              enable_vars=enable_vars,
          )
      )
      hp.note("Params:\n{}".format(repr(params)))
  
      gp = gprm.GaussianProcessRegressionModel(
          kernel=k,
          index_points=index_points,
          observation_index_points=observation_index_points,
          observations=observations,
          cholesky_fn=lambda x: marginal_fns.retrying_cholesky(x)[0],
          observation_noise_variance=params[
              "observation_noise_variance"
          ],
      )
      return gp
  
imports: from absl.testing import parameterized
  import hypothesis
  from hypothesis import strategies
  import numpy
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gaussian_process
  from tensorflow_probability.python.distributions import gaussian_process_regression_model
  from tensorflow_probability.python.distributions import student_t_process
  from tensorflow_probability.python.distributions import student_t_process_regression_model
  from tensorflow_probability.python.distributions import variational_gaussian_process
  from tensorflow_probability.python.experimental.distributions import marginal_fns
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import hypothesis_testlib
label_desc: Use image node_id 5 for calling a global function with example usage: gaussian_process_regression_models(draw, kernel_name, batch_shape, event_dim, feature_dim, feature_ndims, enable_vars) and returns: gp