code: def build_nngp_with_dataset(
      dataset, kernel_type, num_coeffs, dist_type
  ):
      """Builds a GP using the training set in dataset."""
      mean_func = lambda x: np.array([np.median(dataset[1])] * len(x))
      noise_var = (dataset[1].std() ** 2) / 20
      kernel_hyperparams = get_kernel_hyperparams(
          num_coeffs, kernel_type, dist_type
      )
      return nn_gp.NNGP(
          dataset[0],
          dataset[1],
          kernel_type,
          mean_func,
          noise_var,
          dataset[-1],
          kernel_hyperparams,
          dist_type,
      )
  
imports: import numpy
  import unittest
  from .syn_nn_functions import syn_func1_common, cnn_syn_func1, mlp_syn_func1
  from .nn_examples import generate_cnn_architectures, generate_mlp_architectures
  from .None import nn_gp
  from ..utils.ancillary_utils import get_list_of_floats_as_str
  from ..utils.base_test_class import BaseTestClass, execute_tests
  from ..utils.option_handler import load_options
label_desc: Use image node_id 2 for calling a global function with example usage: build_nngp_with_dataset(dataset, kernel_type, num_coeffs, dist_type) and returns: nn_gp