docstr: Raising TypeError if prior type is other than gpytorch.priors.Prior
docstr_tok: ["Raising","TypeError","if","prior","type","is","other","than","gpytorch.priors.Prior"]
code: def test_prior_type(self):
      """
      Raising TypeError if prior type is other than gpytorch.priors.Prior
      """
      kernel_fn = lambda prior: self.create_kernel_with_prior(prior)
      kernel_fn(None)
      kernel_fn(NormalPrior(0, 1))
      self.assertRaises(TypeError, kernel_fn, 1)
  
imports: import unittest
  from gpytorch.kernels import IndexKernel
  from gpytorch.priors import NormalPrior
label_desc: Use image node_id 2 for calling the TestIndexKernel obj's underlying member method code with example usage: obj.test_prior_type() without return types