code: def fit_nngp_with_dataset(dataset, kernel_type, dist_type):
      """Fits an NNGP to this dataset."""
      options = load_options(nn_gp.nn_gp_args, "")
      options.kernel_type = kernel_type
      options.dist_type = dist_type
      gp_fitter = nn_gp.NNGPFitter(
          dataset[0],
          dataset[1],
          dataset[-1],
          options=options,
          reporter=None,
      )
      fitted_result = gp_fitter.fit_gp()
      fitted_gp = fitted_result[1]
      return fitted_gp
  
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 4 for calling a global function with example usage: fit_nngp_with_dataset(dataset, kernel_type, dist_type) and returns: fitted_gp