class_docstr: Basic tests for Kernel function 
class_docstr_tok: ["Basic","tests","for","Kernel","function"]
docstr: Computes the matern kernel given the num value. 
docstr_tok: ["Computes","the","matern","kernel","given","the","num","value","."]
code: def _compute_matern_val_given_nu_scale(cls, nu, scale, dist):
      """Computes the matern kernel given the num value."""
      if nu == 0.5:
          ret_K = np.exp(-dist)
      elif nu == 1.5:
          ret_K = np.exp(-np.sqrt(3) * dist) * (1 + np.sqrt(3) * dist)
      elif nu == 2.5:
          ret_K = np.exp(-np.sqrt(5) * dist) * (
              1 + np.sqrt(5) * dist + (5 / 3.0) * dist**2
          )
      else:
          raise ValueError(
              "Implemented unit tests only for nu = 0.1, 1.5, 2.5"
          )
      ret_K = scale * ret_K
      return ret_K
  
file_path: dragonfly/dragonfly/gp/unittest_kernel.py
imports: from __future__ import absolute_import
  from __future__ import division
  import numpy
  from .kernel import Kernel, SEKernel, MaternKernel, PolyKernel, CoordinateProductKernel
  from ..utils.ancillary_utils import dicts_are_equal
  from ..utils.base_test_class import BaseTestClass, execute_tests
label_desc: Use image node_id 4 for calling the KernelBasicTestCase obj's underlying member method code with example usage: obj._compute_matern_val_given_nu_scale(cls, nu, scale, dist) and returns: ret_K