code: def test_errors(self):
      with self.assertRaises(TypeError):
          NUTS(model=self.test_model, grad_log_pdf=JGD)
      with self.assertRaises(TypeError):
          NUTS(
              model=self.test_model,
              grad_log_pdf=None,
              simulate_dynamics=GradLogPDFGaussian,
          )
      with self.assertRaises(ValueError):
          NUTSda(model=self.test_model, delta=-0.2, grad_log_pdf=None)
      with self.assertRaises(ValueError):
          NUTSda(
              model=self.test_model,
              delta=1.1,
              grad_log_pdf=GradLogPDFGaussian,
          )
      with self.assertRaises(TypeError):
          NUTS(self.test_model, GradLogPDFGaussian).sample(
              initial_pos={1, 1, 1}, num_samples=1
          )
      with self.assertRaises(ValueError):
          NUTS(self.test_model, GradLogPDFGaussian).sample(
              initial_pos=[1, 1], num_samples=1
          )
      with self.assertRaises(TypeError):
          NUTSda(self.test_model, GradLogPDFGaussian).sample(
              initial_pos=1, num_samples=1, num_adapt=1
          )
      with self.assertRaises(ValueError):
          NUTSda(self.test_model, GradLogPDFGaussian).sample(
              initial_pos=[1, 1, 1, 1], num_samples=1, num_adapt=1
          )
      with self.assertRaises(TypeError):
          NUTS(self.test_model, GradLogPDFGaussian).generate_sample(
              initial_pos=0.1, num_samples=1
          ).send(None)
      with self.assertRaises(ValueError):
          NUTS(self.test_model, GradLogPDFGaussian).generate_sample(
              initial_pos=(0, 1, 1, 1), num_samples=1
          ).send(None)
      with self.assertRaises(TypeError):
          NUTSda(self.test_model, GradLogPDFGaussian).generate_sample(
              initial_pos=[[1, 2, 3]], num_samples=1, num_adapt=1
          ).send(None)
      with self.assertRaises(ValueError):
          NUTSda(self.test_model, GradLogPDFGaussian).generate_sample(
              initial_pos=[1], num_samples=1, num_adapt=1
          ).send(None)
  
imports: import sys
  import unittest
  import numpy
  from pgmpy.factors.distributions import GaussianDistribution
  from pgmpy.sampling import HamiltonianMC, HamiltonianMCDA, GradLogPDFGaussian, NoUTurnSampler, NoUTurnSamplerDA
label_desc: Use image node_id 2 for calling the TestNUTSInference obj's underlying member method code with example usage: obj.test_errors() without return types